diff --git a/zed/src/editor.rs b/zed/src/editor.rs index d356d4f197449578b7ff1eb5fc92aa802adb0f05..fdcc07f7dbf01a54b3ed38d69027ab92845de23f 100644 --- a/zed/src/editor.rs +++ b/zed/src/editor.rs @@ -2410,6 +2410,14 @@ pub enum Event { impl Entity for Editor { type Event = Event; + + fn release(&mut self, cx: &mut MutableAppContext) { + self.buffer.update(cx, |buffer, cx| { + buffer + .remove_selection_set(self.selection_set_id, cx) + .unwrap(); + }); + } } impl View for Editor {