Do not add diagnostics for any selection in the diagnostics panel
This commit is contained in:
parent
2f3044a2da
commit
d38a2b793e
2 changed files with 4 additions and 5 deletions
|
@ -209,7 +209,7 @@
|
||||||
"ensure_final_newline_on_save": true,
|
"ensure_final_newline_on_save": true,
|
||||||
// Whether or not to perform a buffer format before saving
|
// Whether or not to perform a buffer format before saving
|
||||||
"format_on_save": "on",
|
"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:
|
// 1. Format code using the current language server:
|
||||||
// "formatter": "language_server"
|
// "formatter": "language_server"
|
||||||
|
|
|
@ -171,10 +171,9 @@ impl ProjectDiagnosticsEditor {
|
||||||
.entry(*language_server_id)
|
.entry(*language_server_id)
|
||||||
.or_default()
|
.or_default()
|
||||||
.insert(path.clone());
|
.insert(path.clone());
|
||||||
let no_multiselections = this.editor.update(cx, |editor, cx| {
|
if this.editor.read(cx).selections.all::<usize>(cx).is_empty()
|
||||||
editor.selections.all::<usize>(cx).len() <= 1
|
&& !this.is_dirty(cx)
|
||||||
});
|
{
|
||||||
if no_multiselections && !this.is_dirty(cx) {
|
|
||||||
this.update_excerpts(Some(*language_server_id), cx);
|
this.update_excerpts(Some(*language_server_id), cx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue