From 73909d940f8aac9b044d7bd45b3f7704c6056e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=B4=D1=80=D0=B0=D0=B3=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=9B?= Date: Sun, 22 Jan 2023 23:19:39 +0100 Subject: [PATCH] Run lsp_open_location command on a window (#153) --- plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 3729503..0776f7f 100644 --- a/plugin.py +++ b/plugin.py @@ -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: