on master help sign in
Remove selections for closed views on all documents (#4888)
8529d75Michael Davis
helix-view/src/editor.rs+4−3
@@ -1116,9 +1116,10 @@ impl Editor {
1116 }
1116 }
1117
1117
1118 pub fn close(&mut self, id: ViewId) {
1118 pub fn close(&mut self, id: ViewId) {
1119− let (_view, doc) = current!(self);
1119+ // Remove selections for the closed view on all documents.
1120− // remove selection
1120+ for doc in self.documents_mut() {
1121− doc.remove_view(id);
1121+ doc.remove_view(id);
1122+ }
1122 self.tree.remove(id);
1123 self.tree.remove(id);
1123 self._refresh();
1124 self._refresh();
1124 }
1125 }