Skip to content

Commit e211ff8

Browse files
committed
Allow brackets in tree search
1 parent ade2fe4 commit e211ff8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Classes/PassiveTreeView.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
440440
local searchWords = {}
441441
for matchstring, v in search:gmatch('"([^"]*)"') do
442442
searchWords[#searchWords+1] = matchstring
443-
search = search:gsub('"'..matchstring..'"', "")
443+
search = search:gsub('"'..matchstring:gsub("([%(%)])", "%%%1")..'"', "")
444444
end
445445
for matchstring, v in search:gmatch("(%S*)") do
446446
if matchstring:match("%S") ~= nil then

src/Classes/TreeTab.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ local TreeTabClass = newClass("TreeTab", "ControlHost", function(self, build)
118118
self.controls.export = new("ButtonControl", { "LEFT", self.controls.import, "RIGHT" }, 8, 0, 90, 20, "Export Tree", function()
119119
self:OpenExportPopup()
120120
end)
121-
self.controls.treeSearch = new("EditControl", { "LEFT", self.controls.export, "RIGHT" }, 8, 0, main.portraitMode and 200 or 300, 20, "", "Search", "%c%(%)", 100, function(buf)
121+
self.controls.treeSearch = new("EditControl", { "LEFT", self.controls.export, "RIGHT" }, 8, 0, main.portraitMode and 200 or 300, 20, "", "Search", "%c", 100, function(buf)
122122
self.viewer.searchStr = buf
123123
end)
124124
self.controls.treeSearch.tooltipText = "Uses Lua pattern matching for complex searches"

0 commit comments

Comments
 (0)