mirror of
https://github.com/neovim/neovim.git
synced 2025-12-25 15:48:55 +00:00
vim-patch:8.2.1679: ":*" is not recognized as a range (#37052)
Problem: Vim9: ":*" is not recognized as a range.
Solution: Move recognizing "*" into skip_range(). (closes vim/vim#6938)
3bd8de40b4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
@@ -1488,9 +1488,6 @@ static char *find_excmd_after_range(exarg_T *eap)
|
||||
// Save location after command modifiers.
|
||||
char *cmd = eap->cmd;
|
||||
eap->cmd = skip_range(eap->cmd, NULL);
|
||||
if (*eap->cmd == '*') {
|
||||
eap->cmd = skipwhite(eap->cmd + 1);
|
||||
}
|
||||
char *p = find_ex_command(eap, NULL);
|
||||
eap->cmd = cmd; // Restore original position for address parsing
|
||||
return p;
|
||||
@@ -3422,6 +3419,11 @@ char *skip_range(const char *cmd, int *ctx)
|
||||
// Skip ":" and white space.
|
||||
cmd = skip_colon_white(cmd, false);
|
||||
|
||||
// Skip "*" used for Visual range.
|
||||
if (*cmd == '*') {
|
||||
cmd = skipwhite(cmd + 1);
|
||||
}
|
||||
|
||||
return (char *)cmd;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user