-
Notifications
You must be signed in to change notification settings - Fork 128
Buffer list not reliably sorted by MRU #250
Comments
Can you still reproduce this in Atom 1.11 or later? |
Im not using Atom any longer, so it will be harder for me to test. Feel free to close this and we can re-open if it's still occurring? |
/cc: @iolsen MRU UX |
The similar report in atom/tabs#314 is fixed in atom/atom-keymap#156 which will ship in 1.14. But I see that fuzzy-finder maintains its own notion of MRU, separate from the list in the core pane class, that should be providing the behavior described but doesn't: https://github.com/atom/fuzzy-finder/blob/master/lib/main.coffee#L21: atom.workspace.observePanes (pane) ->
pane.observeActiveItem (item) -> item?.lastOpened = Date.now() https://github.com/atom/fuzzy-finder/blob/master/lib/buffer-view.coffee#L19: populate: ->
editors = atom.workspace.getTextEditors().filter (editor) -> editor.getPath()?
activeEditor = atom.workspace.getActiveTextEditor()
editors = _.sortBy editors, (editor) ->
if editor is activeEditor
0
else
-(editor.lastOpened or 1)
@paths = editors.map (editor) -> editor.getPath()
@setItems(_.uniq(@paths)) So this appers to be a legit, distinct, bug report we should (at least) leave open. We should figure out why this order by open date isn't working or use the core pane class's MRU list instead. Updating labels accordingly. |
After a closer reading and a bit more testing, I actually think this works as intended. The critical fact is that the CURRENT buffer is sorted to the bottom, so it's not a precise MRU order but that's sensible and clearly intentional here. And the other buffers in the list do appear to be sorting correctly in 1.12 and 1.13. Closing this until/unless there's a repro in recent versions. |
I think this follows on from this issue, if you have a file open (in a tab) called "blah_edit.html", but your project contains say 20 other "_edit.html" files and you ctrl+p and search for "edit" your open file will not be at the top, it will be somewhere else in the list. |
I use the the hot key to swap back/forth from MRU tabs, but they seem to loose context. I recall the file I used after editing my current two, so I should be able to pull up fuzzy finder and hit down twice, but this rarely seems to work.
maybe its related to atom/tabs#314
The text was updated successfully, but these errors were encountered: