diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-06 15:22:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-06 15:22:15 +0200 |
commit | cae92dc3d5bdd4009910671328cd01394bfbe2cf (patch) | |
tree | 8c1473faf774b53957d7987c764bbf5147a607db /src/ex_docmd.c | |
parent | 6d8197485dc84532e37aced2c39292bff374200d (diff) |
patch 8.0.0878: no completion for :mapclearv8.0.0878
Problem: No completion for :mapclear.
Solution: Add completion (Nobuhiro Takasaki et al. closes #1943)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index c61cd2e955..fa5a888d4e 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4223,6 +4223,19 @@ set_one_cmd_context( case CMD_xunmap: return set_context_in_map_cmd(xp, cmd, arg, forceit, FALSE, TRUE, ea.cmdidx); + case CMD_mapclear: + case CMD_nmapclear: + case CMD_vmapclear: + case CMD_omapclear: + case CMD_imapclear: + case CMD_cmapclear: + case CMD_lmapclear: + case CMD_smapclear: + case CMD_xmapclear: + xp->xp_context = EXPAND_MAPCLEAR; + xp->xp_pattern = arg; + break; + case CMD_abbreviate: case CMD_noreabbrev: case CMD_cabbrev: case CMD_cnoreabbrev: case CMD_iabbrev: case CMD_inoreabbrev: @@ -5964,6 +5977,7 @@ static struct && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) {EXPAND_LOCALES, "locale"}, #endif + {EXPAND_MAPCLEAR, "mapclear"}, {EXPAND_MAPPINGS, "mapping"}, {EXPAND_MENUS, "menu"}, {EXPAND_MESSAGES, "messages"}, @@ -12083,6 +12097,14 @@ get_messages_arg(expand_T *xp UNUSED, int idx) } #endif + char_u * +get_mapclear_arg(expand_T *xp UNUSED, int idx) +{ + if (idx == 0) + return (char_u *)"<buffer>"; + return NULL; +} + #ifdef FEAT_AUTOCMD static int filetype_detect = FALSE; static int filetype_plugin = FALSE; |