Mercurial > vim
diff src/ex_docmd.c @ 24176:12378fbc99bc v8.2.2629
patch 8.2.2629: Vim9: error for #{{ is not desired
Commit: https://github.com/vim/vim/commit/a0399efa72380115a3eb650544dd64e459476bd2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 20 15:00:01 2021 +0100
patch 8.2.2629: Vim9: error for #{{ is not desired
Problem: Vim9: error for #{{ is not desired.
Solution: Adjust the checks. (closes https://github.com/vim/vim/issues/7990)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Mar 2021 15:15:02 +0100 |
parents | 99bfaa4693db |
children | a2e6029d354e |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -5234,7 +5234,8 @@ ends_excmd2(char_u *cmd_start UNUSED, ch return TRUE; #ifdef FEAT_EVAL if (in_vim9script()) - return c == '#' && cmd[1] != '{' + // # starts a comment, #{ might be a mistake, #{{ can start a fold + return c == '#' && (cmd[1] != '{' || cmd[2] == '{') && (cmd == cmd_start || VIM_ISWHITE(cmd[-1])); #endif return c == '"';