0
0
mirror of https://github.com/vim/vim.git synced 2025-10-27 09:24:23 -04:00

patch 8.2.2955: Vim9: using filter in compiled command does not work

Problem:    Vim9: using filter in compiled command does not work.
Solution:   Generate EXEC including the command modifier.
This commit is contained in:
Bram Moolenaar
2021-06-06 21:38:09 +02:00
parent 6db7b6375a
commit e729ce294f
6 changed files with 63 additions and 5 deletions

View File

@@ -5277,6 +5277,16 @@ ex_drop(exarg_T *eap)
*/
char_u *
skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
{
return skip_vimgrep_pat_ext(p, s, flags, NULL, NULL);
}
/*
* As skip_vimgrep_pat() and store the character overwritten by NUL in "cp"
* and the pointer to it in "nulp".
*/
char_u *
skip_vimgrep_pat_ext(char_u *p, char_u **s, int *flags, char_u **nulp, int *cp)
{
int c;
@@ -5287,7 +5297,14 @@ skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
*s = p;
p = skiptowhite(p);
if (s != NULL && *p != NUL)
{
if (nulp != NULL)
{
*nulp = p;
*cp = *p;
}
*p++ = NUL;
}
}
else
{
@@ -5301,7 +5318,14 @@ skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
// Truncate the pattern.
if (s != NULL)
{
if (nulp != NULL)
{
*nulp = p;
*cp = *p;
}
*p = NUL;
}
++p;
// Find the flags