mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
Allow multiple leading colons before and after modifiers for 'inccommand'
This commit is contained in:
@@ -10216,10 +10216,13 @@ bool cmd_can_preview(char_u *cmd)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore additional colons at the start...
|
||||||
|
cmd = skip_colon_white(cmd, true);
|
||||||
|
|
||||||
// Ignore any leading modifiers (:keeppatterns, :verbose, etc.)
|
// Ignore any leading modifiers (:keeppatterns, :verbose, etc.)
|
||||||
for (int len = modifier_len(cmd); len != 0; len = modifier_len(cmd)) {
|
for (int len = modifier_len(cmd); len != 0; len = modifier_len(cmd)) {
|
||||||
cmd += len;
|
cmd += len;
|
||||||
cmd = skipwhite(cmd);
|
cmd = skip_colon_white(cmd, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
exarg_T ea;
|
exarg_T ea;
|
||||||
|
@@ -779,6 +779,13 @@ describe(":substitute, inccommand=split", function()
|
|||||||
{15:~ }|
|
{15:~ }|
|
||||||
:silent tabedit %s/tw/to^ |
|
:silent tabedit %s/tw/to^ |
|
||||||
]])
|
]])
|
||||||
|
feed('<Esc>')
|
||||||
|
|
||||||
|
-- leading colons
|
||||||
|
feed(':::%s/tw/to')
|
||||||
|
screen:expect{any=[[{12:to}o lines]]}
|
||||||
|
feed('<Esc>')
|
||||||
|
screen:expect{any=[[two lines]]}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('shows split window when typing the pattern', function()
|
it('shows split window when typing the pattern', function()
|
||||||
|
Reference in New Issue
Block a user