From 06bffe836c98a65d270579f08004503ffce9931c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 28 Nov 2021 20:24:17 +0000 Subject: 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. --- src/ex_docmd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ex_docmd.c') diff --git a/src/ex_docmd.c b/src/ex_docmd.c index d74ef9026..6d2923ccb 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2910,7 +2910,14 @@ parse_command_modifiers( int c = 0; 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; if (*p == '!') { -- cgit v1.2.1