mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
inccommand: Ignore leading modifiers in the command
This commit is contained in:
@@ -9883,7 +9883,7 @@ static void ex_terminal(exarg_T *eap)
|
||||
|
||||
/// Checks if `cmd` is "previewable" (i.e. supported by 'inccommand').
|
||||
///
|
||||
/// @param[in] cmd Commandline to check. May start with a range.
|
||||
/// @param[in] cmd Commandline to check. May start with a range or modifier.
|
||||
///
|
||||
/// @return true if `cmd` is previewable
|
||||
bool cmd_can_preview(char_u *cmd)
|
||||
@@ -9892,6 +9892,12 @@ bool cmd_can_preview(char_u *cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ignore any leading modifiers (:keeppatterns, :verbose, etc.)
|
||||
for (int len = modifier_len(cmd); len != 0; len = modifier_len(cmd)) {
|
||||
cmd += len;
|
||||
cmd = skipwhite(cmd);
|
||||
}
|
||||
|
||||
exarg_T ea;
|
||||
// parse the command line
|
||||
ea.cmd = skip_range(cmd, NULL);
|
||||
|
Reference in New Issue
Block a user