diff options
author | Evgeniy Tatarkin | 2023-04-28 16:05:14 +0000 |
---|---|---|
committer | GitHub | 2023-04-28 16:05:14 +0000 |
commit | 6a1bb81f1022533c226395aaa41439ab1ea41dd4 (patch) | |
tree | 2886a0c1f21edd9ada66dcf5341d4eb3626b6928 /helix-view/src/editor.rs | |
parent | 9c6c63a2be30252a6207f4aebb5e0f76f746b4c8 (diff) |
Sort the buffer picker by most recent access (#2980)
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index fd0abe91..005c6667 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -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) { |