mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-15 14:47:30 +00:00
Remove selection set when an editor is closed
This commit is contained in:
parent
e2b9ab500f
commit
0bc8663d36
1 changed files with 8 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue