diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rs index d208fc9c15819a1ffee304f585bd5dc857b839bb..76e148018089913944fe0ca5379ce76f23658d28 100644 --- a/crates/editor/src/items.rs +++ b/crates/editor/src/items.rs @@ -486,7 +486,6 @@ impl Item for Editor { self.buffer().update(cx, |multibuffer, cx| { multibuffer.update_git(cx); }); - cx.notify(); Task::ready(Ok(())) } diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs index 2cff3796bc1927d736b69227a2b323bd51dd0219..5ddebcaff610e836ddd1b1a1a9849ee88eab5628 100644 --- a/crates/language/src/buffer.rs +++ b/crates/language/src/buffer.rs @@ -662,7 +662,6 @@ impl Buffer { if self.head_text.is_some() { let snapshot = self.snapshot(); let head_text = self.head_text.clone(); - self.diff_update_count += 1; let buffer_diff = cx .background() @@ -671,8 +670,10 @@ impl Buffer { cx.spawn_weak(|this, mut cx| async move { let buffer_diff = buffer_diff.await; if let Some(this) = this.upgrade(&cx) { - this.update(&mut cx, |this, _| { + this.update(&mut cx, |this, cx| { this.git_diff = buffer_diff; + this.diff_update_count += 1; + cx.notify(); }) } })