aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authoritchyny <itchyny@hatena.ne.jp>2021-09-20 23:33:10 +0900
committerGitHub <noreply@github.com>2021-09-20 07:33:10 -0700
commit1f8c91bf729707fdb005292aecca8dd79538f4a5 (patch)
tree7e669cd6e6ae76361ddc031b44d3a1303426c6f0 /src/nvim/ex_getln.c
parent30fefee684e641a0c6867446c6de30efa2f0a126 (diff)
downloadrneovim-1f8c91bf729707fdb005292aecca8dd79538f4a5.tar.gz
rneovim-1f8c91bf729707fdb005292aecca8dd79538f4a5.tar.bz2
rneovim-1f8c91bf729707fdb005292aecca8dd79538f4a5.zip
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
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index ee96ec1c3b..098a009728 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -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