# HG changeset patch # User Bram Moolenaar # Date 1670589902 -3600 # Node ID ca083d0199c685a49228d70f589c5bd91473c52b # Parent 989db125b24d33e69cb785619739fa00619efc00 patch 9.0.1040: test for mapping with CmdlineChanged fails Commit: https://github.com/vim/vim/commit/148bcd361097f85a1a51c408e7412d60c76df14d Author: Bram Moolenaar Date: Fri Dec 9 12:41:32 2022 +0000 patch 9.0.1040: test for mapping with CmdlineChanged fails Problem: Test for mapping with CmdlineChanged fails. Solution: Put back the check for the cmdline length not changing. diff --git a/src/ex_getln.c b/src/ex_getln.c --- 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 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 mapping already triggered the event + if (clen == ccline.cmdlen + || cc_count != aucmd_cmdline_changed_count) trigger_cmdlinechanged = FALSE; goto cmdline_changed; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1040, +/**/ 1039, /**/ 1038,