mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
fe5f38d8bd
commit
51af911a27
@ -603,6 +603,11 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
|
|||||||
cmd_getline, cmd_cookie);
|
cmd_getline, cmd_cookie);
|
||||||
recursive--;
|
recursive--;
|
||||||
|
|
||||||
|
// Ignore trailing '|'-separated commands in preview-mode ('inccommand').
|
||||||
|
if (State & CMDPREVIEW) {
|
||||||
|
next_cmdline = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (cmd_cookie == (void *)&cmd_loop_cookie)
|
if (cmd_cookie == (void *)&cmd_loop_cookie)
|
||||||
/* Use "current_line" from "cmd_loop_cookie", it may have been
|
/* Use "current_line" from "cmd_loop_cookie", it may have been
|
||||||
* incremented when defining a function. */
|
* incremented when defining a function. */
|
||||||
|
@ -1354,6 +1354,23 @@ describe("inccommand=nosplit", function()
|
|||||||
:echo 'foo'^ |
|
:echo 'foo'^ |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it("does not execute trailing bar-separated commands #7494", function()
|
||||||
|
feed(':%s/two/three/g|q!')
|
||||||
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
{12:three} lines |
|
||||||
|
Inc substitution on |
|
||||||
|
{12:three} lines |
|
||||||
|
|
|
||||||
|
{15:~ }|
|
||||||
|
{15:~ }|
|
||||||
|
{15:~ }|
|
||||||
|
{15:~ }|
|
||||||
|
:%s/two/three/g|q!^ |
|
||||||
|
]])
|
||||||
|
eq(eval('v:null'), eval('v:exiting'))
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe(":substitute, 'inccommand' with a failing expression", function()
|
describe(":substitute, 'inccommand' with a failing expression", function()
|
||||||
|
Loading…
Reference in New Issue
Block a user