From 783ff27b1ba901e30dbf9897f4faaeb123bebb12 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Sat, 20 May 2023 21:29:23 +0200 Subject: consistent diagnostic sorting --- helix-term/src/application.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'helix-term/src/application.rs') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 2dd97b42..3abe9cae 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -907,7 +907,9 @@ impl Application { // Sort diagnostics first by severity and then by line numbers. // Note: The `lsp::DiagnosticSeverity` enum is already defined in decreasing order - diagnostics.sort_unstable_by_key(|(d, _)| (d.severity, d.range.start)); + diagnostics.sort_unstable_by_key(|(d, server_id)| { + (d.severity, d.range.start, *server_id) + }); } Notification::ShowMessage(params) => { log::warn!("unhandled window/showMessage: {:?}", params); -- cgit v1.2.3-70-g09d2