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.
This commit is contained in:
Antonio Scandurra 2021-11-01 10:03:33 +01:00
parent 3228a55329
commit f59be5fecf

View file

@ -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(())
}