aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorPascal Kuthe2023-05-20 19:29:23 +0000
committerBlaž Hrastnik2023-12-27 06:28:14 +0000
commit783ff27b1ba901e30dbf9897f4faaeb123bebb12 (patch)
tree105199d4111ad84613075780d98178f3552f55fe /helix-term/src
parent515ef17207878b78e4f5eda8bf710fa0aa1eae87 (diff)
consistent diagnostic sorting
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/application.rs4
1 files changed, 3 insertions, 1 deletions
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);