2
0
mirror of https://github.com/skanehira/tson synced 2024-11-15 12:13:04 +00:00

ignore upper case when searching nodes

This commit is contained in:
skanehira 2019-11-05 15:30:59 +09:00
parent 15f5146c25
commit d79e61f7f9

View File

@ -186,7 +186,7 @@ func (g *Gui) walk(nodes []*tview.TreeNode, text string) []*tview.TreeNode {
for _, child := range nodes {
log.Println(child.GetText())
if strings.Index(strings.ToLower(child.GetText()), text) != -1 {
if strings.Index(strings.ToLower(child.GetText()), strings.ToLower(text)) != -1 {
newNodes = append(newNodes, child)
} else {
newNodes = append(newNodes, g.walk(child.GetChildren(), text)...)