# HG changeset patch # User Bram Moolenaar # Date 1612712704 -3600 # Node ID 00e904bdb8a57a1f4b01099ce3fdc041ac2ce71f # Parent 2d3c3106eb985640724e92fae6b6a811e0ea7167 patch 8.2.2484: Vim9: Cannot use a comment starting with #{ Commit: https://github.com/vim/vim/commit/dee37dc733df444df1950eb922a35560e4b113d6 Author: Bram Moolenaar Date: Sun Feb 7 16:40:05 2021 +0100 patch 8.2.2484: Vim9: Cannot use a comment starting with #{ Problem: Vim9: Cannot use a comment starting with #{ after an expression. Solution: Remove the check for "{" since #{ dictionaries are not supported. diff --git a/src/ex_docmd.c b/src/ex_docmd.c --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -5212,8 +5212,7 @@ ends_excmd2(char_u *cmd_start UNUSED, ch return TRUE; #ifdef FEAT_EVAL if (in_vim9script()) - return c == '#' && cmd[1] != '{' - && (cmd == cmd_start || VIM_ISWHITE(cmd[-1])); + return c == '#' && (cmd == cmd_start || VIM_ISWHITE(cmd[-1])); #endif return c == '"'; } diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -2205,6 +2205,10 @@ def Test_while_loop() result ..= cnt .. '_' endwhile assert_equal('1_3_', result) + + var s = '' + while s == 'x' #{comment + endwhile enddef def Test_while_loop_fails() diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2484, +/**/ 2483, /**/ 2482,