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

de-Bruijn candidate selection may fail when avy-single-candidate-jump is nil #338

Open
dan-robertson opened this issue Jan 3, 2022 · 1 comment

Comments

@dan-robertson
Copy link

The function that assigns sequences to candidates will try to work out how many characters are needed as ceil(log(#candidates)/log(#chars)) but if #candidates = 1, it’s logarithm is 0 and the function will later fail.

One fix would be to clamp this value with a lower bound of 1.

Another may be to use a different candidate-display function if there is a single candidate.

@dan-robertson
Copy link
Author

Actually, the fix described above doesn’t properly work: I get one candidate in the right place and one at the point.

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

No branches or pull requests

1 participant