Skip to content

Commit 42dedae

Browse files
committed
Use add_regions method compatible with ST2 and ST3.
1 parent 91915c5 commit 42dedae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

advanced_new_file/commands/cut_to_file.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def __init__(self, window):
1313
def run(self, is_python=False):
1414
self.is_python = is_python
1515
self.run_setup()
16-
self.view.add_regions(REGION_KEY, self.view.sel(), flags=sublime.HIDDEN)
16+
cursors = []
17+
for cursor in self.view.sel():
18+
cursors.append(cursor)
19+
self.view.add_regions(REGION_KEY, cursors, "")
1720

1821
path = self.settings.get(CUT_TO_FILE_DEFAULT_SETTING, "")
1922
path = self._expand_default_path(path)

0 commit comments

Comments
 (0)