@@ -90,8 +90,9 @@ impl Editor {
90 use crate::tree::Layout;
90 use crate::tree::Layout;
91 match action {
91 match action {
92 Action::Replace => {
92 Action::Replace => {
93− self.view_mut().doc = id;
93+ let view = self.view_mut();
94− // TODO: reset selection?
94+ view.doc = id;
95 return Ok(id);
96 return Ok(id);
97 Action::HorizontalSplit => {
98 Action::HorizontalSplit => {