WIP: Start on removing selections from buffer in favor of editor

This commit is contained in:
Nathan Sobo
2021-12-10 19:23:34 -07:00
parent f35c419f43
commit 8432daef6a
10 changed files with 342 additions and 951 deletions
+3 -1
View File
@@ -322,8 +322,10 @@ impl DiagnosticMessage {
fn update(&mut self, editor: ViewHandle<Editor>, cx: &mut ViewContext<Self>) {
let editor = editor.read(cx);
let cursor_position = editor.newest_selection::<usize>(cx).head();
let buffer = editor.buffer().read(cx);
let cursor_position = editor
.newest_selection::<usize>(&buffer.read(cx), cx)
.head();
let new_diagnostic = buffer
.read(cx)
.diagnostics_in_range::<_, usize>(cursor_position..cursor_position)