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