From: Bram Moolenaar Date: Thu, 29 Oct 2020 19:24:34 +0000 (+0100) Subject: patch 8.2.1923: Vim9: "filter" command modifier doesn't work X-Git-Tag: v8.2.1923 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f6b6ed208a15552f0eb7f27b7ca945f59f22c1d;p=vim patch 8.2.1923: Vim9: "filter" command modifier doesn't work Problem: Vim9: "filter" command modifier doesn't work. Solution: Check for space on char before argument. (closes #7216, closes #7222) --- diff --git a/src/ex_docmd.c b/src/ex_docmd.c index b8ee85c76..48da263df 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2763,7 +2763,7 @@ parse_command_modifiers( } #ifdef FEAT_EVAL // Avoid that "filter(arg)" is recognized. - if (in_vim9script() && !VIM_ISWHITE(*p)) + if (in_vim9script() && !VIM_ISWHITE(p[-1])) break; #endif if (skip_only) diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index 710cd2f8d..61c47b85f 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -312,6 +312,18 @@ def Test_filter_is_not_modifier() assert_equal([#{x: 3, y: 4}], tags) enddef +def Test_filter_is_recognized() + var lines =<< trim END + final expected = "\nType Name Content\n c \"c piyo" + @a = 'hoge' + @b = 'fuga' + @c = 'piyo' + + assert_equal(execute('filter /piyo/ registers abc'), expected) + END + CheckDefAndScriptSuccess(lines) +enddef + def Test_eval_command() var from = 3 var to = 5 diff --git a/src/version.c b/src/version.c index 4e1d570a7..52d868398 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1923, /**/ 1922, /**/