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:
Rob Pilling
2025-12-22 08:49:57 +00:00
committed by GitHub
parent 2b766e1f4d
commit 8d3742ae8d

View File

@@ -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;
}