Fetch code actions on cursor movement instead of on-demand

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2022-02-11 14:41:19 +01:00
co-authored by Nathan Sobo
parent 763d57c94a
commit 2fcdcac080
9 changed files with 134 additions and 70 deletions
+1 -1
View File
@@ -464,7 +464,7 @@ impl FindBar {
self.pending_search = Some(cx.spawn(|this, mut cx| async move {
match ranges.await {
Ok(ranges) => {
if let Some(editor) = cx.read(|cx| editor.upgrade(cx)) {
if let Some(editor) = editor.upgrade(&cx) {
this.update(&mut cx, |this, cx| {
this.highlighted_editors.insert(editor.downgrade());
editor.update(cx, |editor, cx| {