@@ -66,7 +66,7 @@ impl Editor {
69− fn _open(&mut self, id: DocumentId, action: Action) -> Result<DocumentId, Error> {
69+ pub fn switch(&mut self, id: DocumentId, action: Action) -> Result<DocumentId, Error> {
70 use crate::tree::Layout;
70 use crate::tree::Layout;
71 use helix_core::Selection;
71 use helix_core::Selection;
72 match action {
72 match action {
@@ -115,7 +115,7 @@ impl Editor {
115 let doc = Document::new(Rope::from("\n"));
115 let doc = Document::new(Rope::from("\n"));
116 let id = self.documents.insert(doc);
116 let id = self.documents.insert(doc);
117 self.documents[id].id = id;
117 self.documents[id].id = id;
118− self._open(id, action)
118+ self.switch(id, action)
121 pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
121 pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
@@ -159,7 +159,7 @@ impl Editor {
162− self._open(id, action)
162+ self.switch(id, action)
165 pub fn close(&mut self, id: ViewId) {
165 pub fn close(&mut self, id: ViewId) {