From 51af911a271eb95c0032d25bef5e9313b81648b9 Mon Sep 17 00:00:00 2001 From: Nimit Bhardwaj Date: Wed, 11 Apr 2018 22:16:05 +0530 Subject: inccommand: do not execute trailing commands #8256 fix #7494 --- src/nvim/ex_docmd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 7cd6dbdeca..0a20008cd9 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -603,6 +603,11 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline, cmd_getline, cmd_cookie); recursive--; + // Ignore trailing '|'-separated commands in preview-mode ('inccommand'). + if (State & CMDPREVIEW) { + next_cmdline = NULL; + } + if (cmd_cookie == (void *)&cmd_loop_cookie) /* Use "current_line" from "cmd_loop_cookie", it may have been * incremented when defining a function. */ -- cgit