-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort the buffer picker by most recent access #2980
Conversation
Should this be the default behavior of the buffer picker? |
imho yes. this behavior must be default for buffer picker |
helix-view/src/document.rs
Outdated
@@ -662,6 +666,7 @@ impl Document { | |||
if self.selections.get(&view_id).is_none() { | |||
self.reset_selection(view_id); | |||
} | |||
self.used_at = std::time::SystemTime::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to only be tracked when the document is first created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. works on each buffer switch. currently I use this feature right now )
And yes it was not clear.
Now doc.used_at
updated only on pick in buffer picker.
@archseer hi! |
ef59117
to
38ececc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been testing this for a while and I like the behavior 👍
I left some minor comments
38ececc
to
4a32ee8
Compare
c27c9b8
to
14b74aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation LGTM. I like that you kept it simple 👍
1de7935
3bf81fe
to
1de7935
Compare
(rebased on master, there were some small conflicts which were not obvious from the github UI so it looked like a CI problem instead) |
Thanks! |
Hi!
This is naive implementation of most-recent-used buffers picker.
As vim user in past this feature is very needs for me )
Sorry for my poor English.