|
|
|
@ -1176,6 +1176,7 @@ impl Editor {
|
|
|
|
|
let doc = doc_mut!(self, &doc_id);
|
|
|
|
|
doc.ensure_view_init(view.id);
|
|
|
|
|
view.sync_changes(doc);
|
|
|
|
|
doc.mark_as_focused();
|
|
|
|
|
|
|
|
|
|
align_view(doc, view, Align::Center);
|
|
|
|
|
}
|
|
|
|
@ -1246,6 +1247,7 @@ impl Editor {
|
|
|
|
|
let view_id = view!(self).id;
|
|
|
|
|
let doc = doc_mut!(self, &id);
|
|
|
|
|
doc.ensure_view_init(view_id);
|
|
|
|
|
doc.mark_as_focused();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Action::HorizontalSplit | Action::VerticalSplit => {
|
|
|
|
@ -1267,6 +1269,7 @@ impl Editor {
|
|
|
|
|
// initialize selection for view
|
|
|
|
|
let doc = doc_mut!(self, &id);
|
|
|
|
|
doc.ensure_view_init(view_id);
|
|
|
|
|
doc.mark_as_focused();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1417,6 +1420,7 @@ impl Editor {
|
|
|
|
|
let view_id = self.tree.insert(view);
|
|
|
|
|
let doc = doc_mut!(self, &doc_id);
|
|
|
|
|
doc.ensure_view_init(view_id);
|
|
|
|
|
doc.mark_as_focused();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
self._refresh();
|
|
|
|
@ -1471,6 +1475,10 @@ impl Editor {
|
|
|
|
|
view.sync_changes(doc);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let view = view!(self, view_id);
|
|
|
|
|
let doc = doc_mut!(self, &view.doc);
|
|
|
|
|
doc.mark_as_focused();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn focus_next(&mut self) {
|
|
|
|
|