Skip to content

Commit 93a95c2

Browse files
committed
Open a new file tab when an item be selected in show_quick_panel.
1 parent a588965 commit 93a95c2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

erl_autocompletion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def on_text_command(self, view, command_name, args):
6565
sels = view.sel()
6666
point = sels[0].begin()
6767

68-
print(point)
6968
if not view.match_selector(point, "source.erlang"):
7069
return
7170

util/go_to.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,13 @@ def __window_quick_panel_open_window(self, options):
153153

154154
self.__window.show_quick_panel(
155155
[self.__show_option(o) for o in options],
156-
self.__jump_to_in_window,
156+
self.__open_to_in_window,
157157
on_highlight=partial(self.__jump_to_in_window))
158158

159+
def __open_to_in_window(self, index, row_num = None, param_cnt = None):
160+
(fun_name, filepath, row_num) = self.options[index]
161+
sublime.active_window().open_file('{0}:{1}'.format(filepath, row_num or 0), sublime.ENCODED_POSITION)
162+
159163
def __jump_to_in_window(self, index, row_num = None, param_cnt = None):
160164
if index == -1:
161165
self.__window.focus_view(self.__view)

0 commit comments

Comments
 (0)