-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[RFC] allow external ui to draw wildmenu #6168
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
Conversation
src/nvim/ex_getln.c
Outdated
| for (i = 0; i < num_files; i++) { | ||
| ADD(args, STRING_OBJ(cstr_to_string((char *)files_found[i]))); | ||
| } | ||
| ui_event("wildmenu", args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wildmenu_show
| elseif name == "wildmenu_hide" then | ||
| items = nil | ||
| end | ||
| end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wildmenu events may be best handled in screen.lua via functions Screen:_handle_wildmenu_select/Screen:_handle_wildmenu_hide etc as otherwise, any wildmenu events in other tests will make the test fail (as there will be no handler for the event).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There won't be any of these events if the test doens't attach with ext_wildmenu=ture just as other externalised items such as ext_tabline etc.
d399a48 to
2742b02
Compare
2742b02 to
8137608
Compare
|
I wonder if we really want a separate |
|
Command-line is fine for me where it is now, but insert-completion-like popups or something like this would really be nicer for completion then wildmenu is. |
|
but that problem is not nvim side for external ui? ui could draw wildmenu however, the same as popupmenu for instance. Though I think it might be not to hard to use |
|
@bfredl I mean developer may want not take control over drawing cmdline because it is already fine as it is, but take control over wildmenu because it is not. If wildmenu was nicer I would agree that there is not much sense. Though for command-line zsh does better when there are many choices then insert-mode popup. If selection would go in any direction (up, down, left, right) and used (highlighted) candidates appearing above the “statusline” (AFAIR this is being enabled by some option, but I do not remember which exactly) and “statusline” with completion entries did not exist at all it would be better in my opinion. |
|
true, it is just my guess that most extended gui:s would use the external cmdline, if they consider wildmenu. I'm not completely against separate control, just trying to see to not to have too many options. |
e22bf00 to
b6dc40c
Compare
Part of PR #5686