Skip to content

Commit 336496b

Browse files
committed
Fix diagnostics lookup after switching from hardcoded source
1 parent 4084d0d commit 336496b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/core/diagnostics.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ def get_window_diagnostics(window: sublime.Window) -> 'Optional[Dict[str, Dict[s
9393

9494

9595
def get_diagnostics_for_view(view: sublime.View) -> 'List[Diagnostic]':
96+
view_diagnostics = []
9697
window = view.window()
9798
file_path = view.file_name()
98-
origin = 'lsp'
9999
if file_path and window:
100100
if window.id() in window_file_diagnostics:
101101
file_diagnostics = window_file_diagnostics[window.id()]
102102
if file_path in file_diagnostics:
103-
if origin in file_diagnostics[file_path]:
104-
return file_diagnostics[file_path][origin]
105-
return []
103+
for origin in file_diagnostics[file_path]:
104+
view_diagnostics.extend(file_diagnostics[file_path][origin])
105+
return view_diagnostics

0 commit comments

Comments
 (0)