@@ -1116,9 +1116,10 @@ impl Editor {
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 self.tree.remove(id);
1123 self.tree.remove(id);
1123 self._refresh();
1124 self._refresh();