Remove selections for closed views on all documents (#4888)

Previously we removed selections for a closed view on only the
currently focused document. A view might have selections in other
documents though, so the view needs to be removed from all documents.
pull/4896/head
Michael Davis 2 years ago committed by GitHub
parent 4e52d4d6f4
commit 8529d756fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1116,9 +1116,10 @@ impl Editor {
}
pub fn close(&mut self, id: ViewId) {
let (_view, doc) = current!(self);
// remove selection
// Remove selections for the closed view on all documents.
for doc in self.documents_mut() {
doc.remove_view(id);
}
self.tree.remove(id);
self._refresh();
}

Loading…
Cancel
Save