]> granicus.if.org Git - vim/commitdiff
patch 8.2.2853: window is not updated after using <Cmd> mapping v8.2.2853
authorBram Moolenaar <Bram@vim.org>
Sat, 15 May 2021 13:09:06 +0000 (15:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 15 May 2021 13:09:06 +0000 (15:09 +0200)
Problem:    Window is not updated after using <Cmd> mapping.
Solution:   So jump to cmdline_changed but skip autocommand.

src/ex_getln.c
src/version.c

index e87b208cc29001dd453e10048d65ec068bb1029e..4ebc341109bebe7d44bc32b1d947c83cb2999eca 100644 (file)
@@ -1734,6 +1734,8 @@ getcmdline_int(
      */
     for (;;)
     {
+       int trigger_cmdlinechanged = TRUE;
+
        redir_off = TRUE;       // Don't redirect the typed command.
                                // Repeated, because a ":redir" inside
                                // completion may switch it on.
@@ -1764,7 +1766,7 @@ getcmdline_int(
            if (do_cmdline(NULL, getcmdkeycmd, NULL, DOCMD_NOWAIT) == OK)
            {
                if (clen == ccline.cmdlen)
-                   goto cmdline_not_changed;
+                   trigger_cmdlinechanged = FALSE;
                goto cmdline_changed;
            }
        }
@@ -2380,8 +2382,9 @@ cmdline_changed:
        if (is_state.winid != curwin->w_id)
            init_incsearch_state(&is_state);
 #endif
-       // Trigger CmdlineChanged autocommands.
-       trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
+       if (trigger_cmdlinechanged)
+           // Trigger CmdlineChanged autocommands.
+           trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
 
 #ifdef FEAT_SEARCH_EXTRA
        if (xpc.xp_context == EXPAND_NOTHING)
index f7406eec7718370f0fbc085e65705f9dc55e0ace..d04ebfbf7ddb950a3f46e7f536e6c8e1562782f9 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2853,
 /**/
     2852,
 /**/