diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-05-15 13:19:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-15 13:19:16 +0200 |
commit | 847fe7d750001a46a09b97ad57286612d0be8100 (patch) | |
tree | a1240abc97f972c5ebc6e29da430346ea72c9fb0 /src/ex_getln.c | |
parent | 71c6f7a665eb467054fbf319989d97c252af28d2 (diff) | |
download | vim-git-847fe7d750001a46a09b97ad57286612d0be8100.tar.gz |
patch 8.2.2851: using <Cmd> mapping on the command line triggers CmdlineChangedv8.2.2851
Problem: Using <Cmd> mapping on the command line triggers CmdlineChanged.
(Naohiro Ono)
Solution: Jump to cmdline_not_changed if the command line didn't change.
(closes #8208)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index a9f33e6ec..e87b208cc 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1757,9 +1757,17 @@ getcmdline_int( c = safe_vgetc(); } while (c == K_IGNORE || c == K_NOP); - if (c == K_COMMAND - && do_cmdline(NULL, getcmdkeycmd, NULL, DOCMD_NOWAIT) == OK) - goto cmdline_changed; + if (c == K_COMMAND) + { + int clen = ccline.cmdlen; + + if (do_cmdline(NULL, getcmdkeycmd, NULL, DOCMD_NOWAIT) == OK) + { + if (clen == ccline.cmdlen) + goto cmdline_not_changed; + goto cmdline_changed; + } + } if (KeyTyped) { |