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 diagnostics_additional_delay_auto_complete_ms not working after split view #2107

Merged
merged 1 commit into from
Oct 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion plugin/session_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,15 @@ def on_post_save_async(self, view: sublime.View, new_uri: DocumentUri) -> None:
self.session.send_notification(did_save(view, include_text, self.last_known_uri))

def some_view(self) -> Optional[sublime.View]:
if not self.session_views:
return None
# Prefer active view if possible
active_view = self.session.window.active_view()
for sv in self.session_views:
if sv.view == active_view:
return active_view
for sv in self.session_views:
return sv.view
return None

def _if_view_unchanged(self, f: Callable[[sublime.View, Any], None], version: int) -> Callable[[Any], None]:
"""
Expand Down