comparison src/cmdexpand.c @ 34082:a197265a2e07 v9.1.0010

patch 9.1.0010: Keymap completion is not available Commit: https://github.com/vim/vim/commit/81642d9d6ff5cd6a90a012b1b98632ce51eeb1a8 Author: Doug Kearns <dougkearns@gmail.com> Date: Thu Jan 4 22:37:44 2024 +0100 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>
author Christian Brabandt <cb@256bit.org>
date Thu, 04 Jan 2024 22:45:04 +0100
parents e628d7f03758
children 17c21bb47bfd
comparison
equal deleted inserted replaced
34081:ffbe5109233f 34082:a197265a2e07
48 && xp->xp_context != EXPAND_DIRECTORIES 48 && xp->xp_context != EXPAND_DIRECTORIES
49 && xp->xp_context != EXPAND_FILES 49 && xp->xp_context != EXPAND_FILES
50 && xp->xp_context != EXPAND_FILES_IN_PATH 50 && xp->xp_context != EXPAND_FILES_IN_PATH
51 && xp->xp_context != EXPAND_FILETYPE 51 && xp->xp_context != EXPAND_FILETYPE
52 && xp->xp_context != EXPAND_HELP 52 && xp->xp_context != EXPAND_HELP
53 && xp->xp_context != EXPAND_KEYMAP
53 && xp->xp_context != EXPAND_OLD_SETTING 54 && xp->xp_context != EXPAND_OLD_SETTING
54 && xp->xp_context != EXPAND_STRING_SETTING 55 && xp->xp_context != EXPAND_STRING_SETTING
55 && xp->xp_context != EXPAND_SETTING_SUBTRACT 56 && xp->xp_context != EXPAND_SETTING_SUBTRACT
56 && xp->xp_context != EXPAND_OWNSYNTAX 57 && xp->xp_context != EXPAND_OWNSYNTAX
57 && xp->xp_context != EXPAND_PACKADD 58 && xp->xp_context != EXPAND_PACKADD
1392 if (context == EXPAND_HELP 1393 if (context == EXPAND_HELP
1393 || context == EXPAND_COLORS 1394 || context == EXPAND_COLORS
1394 || context == EXPAND_COMPILER 1395 || context == EXPAND_COMPILER
1395 || context == EXPAND_OWNSYNTAX 1396 || context == EXPAND_OWNSYNTAX
1396 || context == EXPAND_FILETYPE 1397 || context == EXPAND_FILETYPE
1398 || context == EXPAND_KEYMAP
1397 || context == EXPAND_PACKADD 1399 || context == EXPAND_PACKADD
1398 || context == EXPAND_RUNTIME 1400 || context == EXPAND_RUNTIME
1399 || ((context == EXPAND_TAGS_LISTFILES 1401 || ((context == EXPAND_TAGS_LISTFILES
1400 || context == EXPAND_TAGS) 1402 || context == EXPAND_TAGS)
1401 && fname[0] == '/')) 1403 && fname[0] == '/'))
3129 if (xp->xp_context == EXPAND_FILETYPE) 3131 if (xp->xp_context == EXPAND_FILETYPE)
3130 { 3132 {
3131 char *directories[] = {"syntax", "indent", "ftplugin", NULL}; 3133 char *directories[] = {"syntax", "indent", "ftplugin", NULL};
3132 return ExpandRTDir(pat, 0, numMatches, matches, directories); 3134 return ExpandRTDir(pat, 0, numMatches, matches, directories);
3133 } 3135 }
3136 #ifdef FEAT_KEYMAP
3137 if (xp->xp_context == EXPAND_KEYMAP)
3138 {
3139 char *directories[] = {"keymap", NULL};
3140 return ExpandRTDir(pat, 0, numMatches, matches, directories);
3141 }
3142 #endif
3134 #if defined(FEAT_EVAL) 3143 #if defined(FEAT_EVAL)
3135 if (xp->xp_context == EXPAND_USER_LIST) 3144 if (xp->xp_context == EXPAND_USER_LIST)
3136 return ExpandUserList(xp, matches, numMatches); 3145 return ExpandUserList(xp, matches, numMatches);
3137 #endif 3146 #endif
3138 if (xp->xp_context == EXPAND_PACKADD) 3147 if (xp->xp_context == EXPAND_PACKADD)