diff --git a/assets/settings/default.json b/assets/settings/default.json index 9a6c7587d6266a9a80f0ef36b46e678d878f4bd6..42f3b3128666e84274a472fadd498652eadaa8a5 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -209,7 +209,7 @@ "ensure_final_newline_on_save": true, // Whether or not to perform a buffer format before saving "format_on_save": "on", - // How to perform a buffer format. This setting can take two values: + // How to perform a buffer format. This setting can take 4 values: // // 1. Format code using the current language server: // "formatter": "language_server" diff --git a/crates/diagnostics/src/diagnostics.rs b/crates/diagnostics/src/diagnostics.rs index e794771434a0981fe5af2efa1ae19d9db7b0f523..4748f63e5d37e29174777ea326ce8158787acd09 100644 --- a/crates/diagnostics/src/diagnostics.rs +++ b/crates/diagnostics/src/diagnostics.rs @@ -171,10 +171,9 @@ impl ProjectDiagnosticsEditor { .entry(*language_server_id) .or_default() .insert(path.clone()); - let no_multiselections = this.editor.update(cx, |editor, cx| { - editor.selections.all::(cx).len() <= 1 - }); - if no_multiselections && !this.is_dirty(cx) { + if this.editor.read(cx).selections.all::(cx).is_empty() + && !this.is_dirty(cx) + { this.update_excerpts(Some(*language_server_id), cx); } }