-
Notifications
You must be signed in to change notification settings - Fork 24
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(menu): allow relative
win settings other than win
#90
Conversation
win
key is nil if win_configs.relative
~= "win"
relative
win settings other than win
@willothy Is there any problem if we left |
Yes if relative ~= "win" and the Added a few more changes to this as well, needed for positioning of the fzf window (also hides the fzf top border if possible to save height). |
9e83cd7
to
5cff531
Compare
Also, the ui-select is working great, just needs a bit more work on positioning. Here's a demo: I've also added custom extmarks to the 3rd section of the demo, to showcase an idea I've had where menu entries could have virtual text displayed below them for extra line-associated context.
The menu class is very versatile and feels better than 2023-09-25.03-23-35.mp4 |
Ensures `win` key is nil if `win_configs.relative` ~= `"win"`, and sets the fzf window location relative to the main window instead of calculating the `relative="editor"` width.
5cff531
to
336f525
Compare
I then wonder why |
It's set because the global configs are used when creating windows, and overridden by the menu-local settings, but I'm not sure how that could be done other than completely overriding the global config with window-local settings, which I don't think would be ideal. Checking the |
@willothy This makes full sense to me, thanks for pointing out. Could we fix the wrong |
Yes, definitely. Updated! |
Allows menus to be created with positions relative to
cursor
,editor
, etc.Main reason for this is that I'm working on a
dropbar_menu_t
implementation ofvim.ui.select
.