Skip to content

Commit 75b59d2

Browse files
authored
ignore background files for toggling diagnostics panel on save (#2069)
1 parent de2cd85 commit 75b59d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/documents.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ def on_diagnostics_updated_async(self) -> None:
286286
if userprefs().show_code_actions:
287287
self._do_code_actions()
288288
self._update_diagnostic_in_status_bar_async()
289-
if self.view.change_count() == self._change_count_on_last_save:
289+
window = self.view.window()
290+
is_active_view = window and window.active_view() == self.view
291+
if is_active_view and self.view.change_count() == self._change_count_on_last_save:
290292
self._toggle_diagnostics_panel_if_needed_async()
291293

292294
def _update_diagnostic_in_status_bar_async(self) -> None:

0 commit comments

Comments
 (0)