forked from aniani/vim
patch 8.2.3690: Vim9: "filter #pat# cmd" does not work
Problem: Vim9: "filter #pat# cmd" does not work. Solution: Do not see #pat# as a comment.
This commit is contained in:
parent
3ccb579516
commit
06bffe836c
@ -2910,7 +2910,14 @@ parse_command_modifiers(
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
|
|
||||||
if (!checkforcmd_noparen(&p, "filter", 4)
|
if (!checkforcmd_noparen(&p, "filter", 4)
|
||||||
|| *p == NUL || ends_excmd(*p))
|
|| *p == NUL
|
||||||
|
|| (ends_excmd(*p)
|
||||||
|
#ifdef FEAT_EVAL
|
||||||
|
// in ":filter #pat# cmd" # does not
|
||||||
|
// start a comment
|
||||||
|
&& (!in_vim9script() || VIM_ISWHITE(p[1]))
|
||||||
|
#endif
|
||||||
|
))
|
||||||
break;
|
break;
|
||||||
if (*p == '!')
|
if (*p == '!')
|
||||||
{
|
{
|
||||||
|
@ -714,6 +714,16 @@ def Test_command_modifier_filter()
|
|||||||
assert_match('very specific z3d37dh234 string', Screenline(&lines))
|
assert_match('very specific z3d37dh234 string', Screenline(&lines))
|
||||||
END
|
END
|
||||||
CheckDefAndScriptSuccess(lines)
|
CheckDefAndScriptSuccess(lines)
|
||||||
|
|
||||||
|
lines =<< trim END
|
||||||
|
edit foobar
|
||||||
|
redir => g:filter_out
|
||||||
|
filter #foobar# ls
|
||||||
|
redir END
|
||||||
|
assert_match('"foobar"', g:filter_out)
|
||||||
|
unlet g:filter_out
|
||||||
|
END
|
||||||
|
CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_win_command_modifiers()
|
def Test_win_command_modifiers()
|
||||||
|
@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3690,
|
||||||
/**/
|
/**/
|
||||||
3689,
|
3689,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user