mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
fix(inccommand): ignore trailing commands only for *previewed* command #15638
Since the `State` is global, other scripts are unexpectedly affected during the 'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in order to ignore trailing '|'-separated commands only for the command invoking the preview. fix #8796, update #7494
This commit is contained in:
@@ -2254,7 +2254,7 @@ static int command_line_changed(CommandLineState *s)
|
||||
State |= CMDPREVIEW;
|
||||
emsg_silent++; // Block error reporting as the command may be incomplete
|
||||
msg_silent++; // Block messages, namely ones that prompt
|
||||
do_cmdline(ccline.cmdbuff, NULL, NULL, DOCMD_KEEPLINE|DOCMD_NOWAIT);
|
||||
do_cmdline(ccline.cmdbuff, NULL, NULL, DOCMD_KEEPLINE|DOCMD_NOWAIT|DOCMD_PREVIEW);
|
||||
msg_silent--; // Unblock messages
|
||||
emsg_silent--; // Unblock error reporting
|
||||
|
||||
|
Reference in New Issue
Block a user