on master help sign in
Apply all review suggestions (doc_id -> id, error message, unnecessary if)
f45bbf1Philipp Mildenberger
helix-term/src/ui/completion.rs+1−1
@@ -220,7 +220,7 @@ impl Completion {
220 {
220 {
221 Some(ls) => ls,
221 Some(ls) => ls,
222 None => {
222 None => {
223− editor.set_error("language server disappeared between completion request and application");
223+ editor.set_error("completions are outdated");
224 // TODO close the completion menu somehow,
224 // TODO close the completion menu somehow,
225 // currently there is no trivial way to access the EditorView to close the completion menu
225 // currently there is no trivial way to access the EditorView to close the completion menu
226 return;
226 return;
helix-view/src/editor.rs+3−3
@@ -1353,10 +1353,10 @@ impl Editor {
1353 }
1353 }
1354 doc.set_version_control_head(self.diff_providers.get_current_head_name(&path));
1354 doc.set_version_control_head(self.diff_providers.get_current_head_name(&path));
1355
1355
1356− let doc_id = self.new_document(doc);
1356+ let id = self.new_document(doc);
1357− let _ = self.launch_language_servers(doc_id);
1357+ let _ = self.launch_language_servers(id);
1358
1358
1359− doc_id
1359+ id
1360 };
1360 };
1361
1361
1362 self.switch(id, action);
1362 self.switch(id, action);
helix-view/src/gutter.rs−3
@@ -66,9 +66,6 @@ pub fn diagnostic<'doc>(
66 }
66 }
67 use helix_core::diagnostic::Severity;
67 use helix_core::diagnostic::Severity;
68 let first_diag_idx_maybe_on_line = diagnostics.partition_point(|d| d.line < line);
68 let first_diag_idx_maybe_on_line = diagnostics.partition_point(|d| d.line < line);
69− if first_diag_idx_maybe_on_line == diagnostics.len() {
70− return None;
71− }
72 let diagnostics_on_line = diagnostics[first_diag_idx_maybe_on_line..]
69 let diagnostics_on_line = diagnostics[first_diag_idx_maybe_on_line..]
73 .iter()
70 .iter()
74 .take_while(|d| {
71 .take_while(|d| {