mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:9.0.1774: no support for custom cmdline completion (#24808)
Problem: no support for custom cmdline completion
Solution: Add new vimscript functions
Add the following two functions:
- getcmdcompltype() returns custom and customlist functions
- getcompletion() supports both custom and customlist
closes: vim/vim#12228
92997dda78
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
This commit is contained in:
@@ -425,6 +425,13 @@ char *get_user_cmd_complete(expand_T *xp, int idx)
|
||||
|
||||
int cmdcomplete_str_to_type(const char *complete_str)
|
||||
{
|
||||
if (strncmp(complete_str, "custom,", 7) == 0) {
|
||||
return EXPAND_USER_DEFINED;
|
||||
}
|
||||
if (strncmp(complete_str, "customlist,", 11) == 0) {
|
||||
return EXPAND_USER_LIST;
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)(ARRAY_SIZE(command_complete)); i++) {
|
||||
char *cmd_compl = get_command_complete(i);
|
||||
if (cmd_compl == NULL) {
|
||||
|
Reference in New Issue
Block a user