Skip to content

Commit 4733765

Browse files
committedAug 2, 2018
Only show diagnostics in view status when > 0
Makes the arrival of errors pop more Also improves cleanup when unloading the package
1 parent fbbe734 commit 4733765

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎plugin/diagnostics.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ def update_diagnostics_in_status_bar(view: sublime.View):
189189
if diagnostic.severity == DiagnosticSeverity.Warning:
190190
warnings += 1
191191

192-
count = 'E: {} W: {}'.format(errors, warnings)
192+
if errors > 0 or warnings > 0:
193+
count = 'E: {} W: {}'.format(errors, warnings)
194+
else:
195+
count = ""
193196
view.set_status('lsp_errors_warning_count', count)
194197

195198

0 commit comments

Comments
 (0)
Please sign in to comment.