Mercurial > vim
changeset 24628:447426630e44 v8.2.2853
patch 8.2.2853: window is not updated after using <Cmd> mapping
Commit: https://github.com/vim/vim/commit/d832c3c56ec7043322ad3e99897e312700fa1d3e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 15 15:09:06 2021 +0200
patch 8.2.2853: window is not updated after using <Cmd> mapping
Problem: Window is not updated after using <Cmd> mapping.
Solution: So jump to cmdline_changed but skip autocommand.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 15 May 2021 15:15:03 +0200 |
parents | 8a45d77243c8 |
children | 0b313a853672 |
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 @@ -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)