Mercurial > vim
changeset 31414:ca083d0199c6 v9.0.1040
patch 9.0.1040: test for <Cmd> mapping with CmdlineChanged fails
Commit: https://github.com/vim/vim/commit/148bcd361097f85a1a51c408e7412d60c76df14d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 9 12:41:32 2022 +0000
patch 9.0.1040: test for <Cmd> mapping with CmdlineChanged fails
Problem: Test for <Cmd> mapping with CmdlineChanged fails.
Solution: Put back the check for the cmdline length not changing.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 09 Dec 2022 13:45:02 +0100 |
parents | 989db125b24d |
children | 4fd33db887f2 |
files | src/ex_getln.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1785,13 +1785,16 @@ getcmdline_int( if (c == K_COMMAND || c == K_SCRIPT_COMMAND) { + int clen = ccline.cmdlen; int cc_count = aucmd_cmdline_changed_count; if (do_cmdkey_command(c, DOCMD_NOWAIT) == OK) { - // Do not trigger CmdlineChanged below if the <Cmd> mapping - // already did that. - if (cc_count != aucmd_cmdline_changed_count) + // Do not trigger CmdlineChanged below if: + // - the length of the command line didn't change + // - the <Cmd> mapping already triggered the event + if (clen == ccline.cmdlen + || cc_count != aucmd_cmdline_changed_count) trigger_cmdlinechanged = FALSE; goto cmdline_changed; }