comparison 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
comparison
equal deleted inserted replaced
24175:96522ca7aac2 24176:12378fbc99bc
5232 5232
5233 if (c == NUL || c == '|' || c == '\n') 5233 if (c == NUL || c == '|' || c == '\n')
5234 return TRUE; 5234 return TRUE;
5235 #ifdef FEAT_EVAL 5235 #ifdef FEAT_EVAL
5236 if (in_vim9script()) 5236 if (in_vim9script())
5237 return c == '#' && cmd[1] != '{' 5237 // # starts a comment, #{ might be a mistake, #{{ can start a fold
5238 return c == '#' && (cmd[1] != '{' || cmd[2] == '{')
5238 && (cmd == cmd_start || VIM_ISWHITE(cmd[-1])); 5239 && (cmd == cmd_start || VIM_ISWHITE(cmd[-1]));
5239 #endif 5240 #endif
5240 return c == '"'; 5241 return c == '"';
5241 } 5242 }
5242 5243