summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-02-07 16:40:05 +0100
committerBram Moolenaar <Bram@vim.org>2021-02-07 16:40:05 +0100
commitdee37dc733df444df1950eb922a35560e4b113d6 (patch)
treed2f8d26934b53a60da5b5a2cd19ca56f02745c91
parent6628b7ebff1cfcb476ce96852a7d2b095872826c (diff)
patch 8.2.2484: Vim9: Cannot use a comment starting with #{v8.2.2484
Problem: Vim9: Cannot use a comment starting with #{ after an expression. Solution: Remove the check for "{" since #{ dictionaries are not supported.
-rw-r--r--src/ex_docmd.c3
-rw-r--r--src/testdir/test_vim9_script.vim4
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index a2e53ad349..9409d7c5e0 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -5212,8 +5212,7 @@ ends_excmd2(char_u *cmd_start UNUSED, char_u *cmd)
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
index 72e12740ad..7f1e71dc68 100644
--- 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
index 4c53107001..cbef3daf67 100644
--- 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,