Skip to content

Commit 671e6ae

Browse files
committed
fix performance of quick find all for multiple selections (#16)
1 parent ccef8ff commit 671e6ae

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

MultiEditUtils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ class MultiFindAllCommand(sublime_plugin.TextCommand):
77
def run(self, edit):
88

99
view = self.view
10+
newRegions = []
1011

1112
for region in view.sel():
1213
substr = view.substr(region)
1314
for region in view.find_all(substr, sublime.LITERAL):
14-
view.sel().add(region)
15+
newRegions.append(region)
1516

17+
for region in newRegions:
18+
view.sel().add(region)
1619

1720

1821
class JumpToLastRegionCommand(sublime_plugin.TextCommand):

0 commit comments

Comments
 (0)