vim-patch:8.2.1978: making a mapping work in all modes is complicated

Problem:    Making a mapping work in all modes is complicated.
Solution:   Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282,
            closes 4784, based on patch by Bjorn Linse)

957cf67d50

Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-05-07 08:12:42 +08:00
parent 1cbfed03c2
commit a2b9117ca8
6 changed files with 494 additions and 21 deletions

View File

@@ -876,7 +876,7 @@ static int insert_handle_key(InsertState *s)
state_handle_k_event();
goto check_pum;
case K_COMMAND: // some command
case K_COMMAND: // <Cmd>command<CR>
do_cmdline(NULL, getcmdkeycmd, NULL, 0);
goto check_pum;