Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lsp_show_scope_name command not working if view was dragged to a new window #1926

Merged
merged 1 commit into from
Jan 2, 2022

Conversation

jwortmann
Copy link
Member

@jwortmann jwortmann commented Dec 30, 2021

It is the same bug and fix as #1852.

I think the actual underlying bug is in the ST API, because

LSP/boot.py

Line 202 in f1e96dc

def on_post_move_async(self, view: sublime.View) -> None:
is only called when a view is dragged between two existing windows (or inside a single window), but not when it is dragged to a new window. I've tested and verified this with a few print statements.

With this API bug, the WindowRegistry doesn't get to know the new window ID, and therefore

return windows.listener_for_view(self.view)
doesn't work, which is called by LspTextCommand.is_enabled(), which then will return False.

@rwols rwols merged commit 19a01aa into sublimelsp:main Jan 2, 2022
@jwortmann jwortmann deleted the fix-scope-popup branch January 3, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants