From f59be5fecfa252800fd725fad7ad2580170365f0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 1 Nov 2021 10:03:33 +0100 Subject: [PATCH] Always notify when receiving buffer operations We had changed it to only emit a notification when the buffer was actually edited, but we also want to notify when we receive non-edit operations, such as a selection update. --- crates/language/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/language/src/lib.rs b/crates/language/src/lib.rs index fd7f8d44b1..02744ceb79 100644 --- a/crates/language/src/lib.rs +++ b/crates/language/src/lib.rs @@ -1299,6 +1299,9 @@ impl Buffer { let old_version = self.version.clone(); self.text.apply_ops(ops)?; self.did_edit(old_version, was_dirty, cx); + // Notify independently of whether the buffer was edited as the operations could include a + // selection update. + cx.notify(); Ok(()) }