-
Notifications
You must be signed in to change notification settings - Fork 33
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
Handle situations when actual height of minibuffer is not enough. #12
Comments
Good catch. I think both problems can be solved by the same fix. We just have to keep track of the actual number of display lines as candidates are inserted, and stop at the appropriate point. |
I just notice that the next/prev page commands also have this problem. They should be fixed too. |
Let me know what you think of this implementation. |
I've tested it and read the code. The "undesirable gradual scrolling effect" you described actually doesn't only happen for long candidates, but also when the height of the minibuffer is small (due to I think the implementation is acceptable from a user's perspective, and I doubt whether it can be done better. |
OK, closing.
Oh really? That's surprising to me, from my understanding of the algorithm it should be impossible for the scrolling case to trigger unless there is a multiline candidate somewhere. Are there particular conditions you have to follow to get this behavior? |
No, just resize the window so you can't have a minibuffer that satisfies I tried to record a gif, but it can't show the problem. I also tested using |
I can see that as well. You could open a new issue for it if you like. |
There's a variable
max-mini-window-height
that controls the maximum height of the minibuffer window, and it can cause the actual height being smaller than(1+ selectrum-num-candidates-displayed)
. So this may happen:selectrum-num-candidates-displayed
is 10, but the actual height of the minibuffer is 9, so the cursor goes outside of the boundary.Besides, multi-line candidates also cause problem, like when browsing a kill-ring:
The text was updated successfully, but these errors were encountered: