Skip to content
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

fix(buffers): bad sort_lastused result selection #3289

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

jamestrew
Copy link
Contributor

Bad condition led to the selection being stuck at idx = 2 until only one result is left, despite idx = 1 result being a better match.

Neither sort_lastused or ignore_current_buffer should affect the position of the selection.
Former is used simply to sort the buffer list. The latter is used to filter out the current buffer.

closes #3262

Bad condition led to the selection being stuck at idx = 2 until only one
result is left, despite idx = 1 result being a better match.

Neither `sort_lastused` or `ignore_current_buffer` should affect the
position of the selection.
Former is used simply to sort the buffer list. The latter is used to
filter out the current buffer.
@jamestrew jamestrew merged commit 1398e11 into nvim-telescope:master Sep 12, 2024
12 checks passed
@jamestrew jamestrew deleted the buf-ignore-current branch September 12, 2024 01:52
@Conni2461
Copy link
Member

This is actually a breaking change and was here for a reason. Sort last used matches the behavoir of fzf where we always select the last used buffer Index 2. Index 1 is always the current buffer.

@jamestrew
Copy link
Contributor Author

Huh... That behavior doesn't really make sense to me 😅 but I can revert this and make a note of that in the docs instead of you prefer. I don't have a strong opinion on this.

@Conni2461
Copy link
Member

we just need other behavior in the core picker. selection idx should be reset if default selection idx was set and you start typing. the idea behind having the previous buffer selected is that you can switch between current and previous buffer using telescope without navigating (you can do this with vim only ik, but ppl are ppl), this now is no longer possible.

see also #179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sort_lastused selection behavior
2 participants