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

Reuse pick letters #186

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Reuse pick letters #186

merged 1 commit into from
Dec 30, 2023

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Dec 29, 2023

Make first_valid a function-level variable rather than a module-level one. This way when buffers are deleted, the letters at the begining of the list are re-used.

This improves the UX when use_filename is false:

  • The letters at the begining of the list are likely to be the best ones. My setup puts the home row keys at the start.
  • Otherwise, if you keep deleting buffers you can use up all the letters and get ? for all your buffers.

@bendk bendk changed the title Reuse pick letters faster Reuse pick letters Dec 29, 2023
Make `first_valid` a function-level variable rather than a module-level
one.  This way when buffers are deleted, the letters at the begining of
the list are re-used.

This improves the UX when `use_filename` is false:
  - The letters at the begining of the list are likely to be the best
    ones.  My setup puts the home row keys at the start.
  - Otherwise, if you keep deleting buffers you can use up all the
    letters and get `?` for all your buffers.
@willothy
Copy link
Owner

Thanks for the PR! Looks good at first glance, and the change makes sense - I'll test it out and merge later today :)

Copy link
Owner

@willothy willothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, seems to work nicely! thanks :)

@willothy willothy merged commit a5e41ba into willothy:main Dec 30, 2023
2 of 4 checks passed
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.

None yet

2 participants