Skip to content

Commit

Permalink
Run lsp_open_location command on a window (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic authored Jan 22, 2023
1 parent e712277 commit 73909d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ def onVueFindReferences(self, params: VueFindReferencesParams) -> None:
view = sublime.active_window().active_view()
if not view:
return
window = view.window()
references = params['references']
if len(references) == 1:
args = {
'location': references[0],
'session_name': session.config.name,
}
view.run_command('lsp_open_location', args)
if window:
window.run_command('lsp_open_location', args)
elif references:
LocationPicker(view, session, params['references'], side_by_side=False)
else:
Expand Down

0 comments on commit 73909d9

Please sign in to comment.