diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-20 08:42:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-20 08:42:18 -0700 |
| commit | f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73 (patch) | |
| tree | cb57bbedc1537f7f47e1768c8ab8b9e6a527381c /src/nvim/ex_getln.c | |
| parent | 7d67bd58655052103f3891122f0e6fe30ae1f829 (diff) | |
| download | rneovim-f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73.tar.gz rneovim-f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73.tar.bz2 rneovim-f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73.zip | |
fix(inccommand): ignore trailing commands only for *previewed* command #15732
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
Co-authored-by: itchyny <itchyny@hatena.ne.jp>
Diffstat (limited to 'src/nvim/ex_getln.c')
| -rw-r--r-- | src/nvim/ex_getln.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index f63987136f..33c0097ba4 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -2251,7 +2251,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 |