0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.1.0010: Keymap completion is not available

Problem:  Keymap completion is not available
Solution: Add keymap completion (Doug Kearns)

Add keymap completion to the 'keymap' option, user commands and builtin
completion functions.

closes: #13692

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2024-01-04 22:37:44 +01:00
committed by Christian Brabandt
parent f93b1c881a
commit 81642d9d6f
9 changed files with 41 additions and 2 deletions

View File

@@ -50,6 +50,7 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
&& xp->xp_context != EXPAND_FILES_IN_PATH
&& xp->xp_context != EXPAND_FILETYPE
&& xp->xp_context != EXPAND_HELP
&& xp->xp_context != EXPAND_KEYMAP
&& xp->xp_context != EXPAND_OLD_SETTING
&& xp->xp_context != EXPAND_STRING_SETTING
&& xp->xp_context != EXPAND_SETTING_SUBTRACT
@@ -1394,6 +1395,7 @@ addstar(
|| context == EXPAND_COMPILER
|| context == EXPAND_OWNSYNTAX
|| context == EXPAND_FILETYPE
|| context == EXPAND_KEYMAP
|| context == EXPAND_PACKADD
|| context == EXPAND_RUNTIME
|| ((context == EXPAND_TAGS_LISTFILES
@@ -3131,6 +3133,13 @@ ExpandFromContext(
char *directories[] = {"syntax", "indent", "ftplugin", NULL};
return ExpandRTDir(pat, 0, numMatches, matches, directories);
}
#ifdef FEAT_KEYMAP
if (xp->xp_context == EXPAND_KEYMAP)
{
char *directories[] = {"keymap", NULL};
return ExpandRTDir(pat, 0, numMatches, matches, directories);
}
#endif
#if defined(FEAT_EVAL)
if (xp->xp_context == EXPAND_USER_LIST)
return ExpandUserList(xp, matches, numMatches);