comparison src/ex_docmd.c @ 23179:821701ecbde7 v8.2.2135

patch 8.2.2135: Vim9: #{ still seen as start of dict in some places Commit: https://github.com/vim/vim/commit/93f82cbee515e13b564f51ddcd5e3d6694358ba4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 12 21:25:56 2020 +0100 patch 8.2.2135: Vim9: #{ still seen as start of dict in some places Problem: Vim9: #{ still seen as start of dict in some places. Solution: Remove check for { after #. (closes https://github.com/vim/vim/issues/7456)
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Dec 2020 21:30:03 +0100
parents bb7531f77529
children 055fa9db6f39
comparison
equal deleted inserted replaced
23178:97d5bc8b35a4 23179:821701ecbde7
1681 static int 1681 static int
1682 comment_start(char_u *p, int starts_with_colon UNUSED) 1682 comment_start(char_u *p, int starts_with_colon UNUSED)
1683 { 1683 {
1684 #ifdef FEAT_EVAL 1684 #ifdef FEAT_EVAL
1685 if (in_vim9script()) 1685 if (in_vim9script())
1686 return p[0] == '#' && p[1] != '{' && !starts_with_colon; 1686 return p[0] == '#' && !starts_with_colon;
1687 #endif 1687 #endif
1688 return *p == '"'; 1688 return *p == '"';
1689 } 1689 }
1690 1690
1691 # define CURRENT_WIN_NR current_win_nr(curwin) 1691 # define CURRENT_WIN_NR current_win_nr(curwin)
4778 || p != eap->arg + 1 || p[-1] != '@')) 4778 || p != eap->arg + 1 || p[-1] != '@'))
4779 #ifdef FEAT_EVAL 4779 #ifdef FEAT_EVAL
4780 || (*p == '#' 4780 || (*p == '#'
4781 && in_vim9script() 4781 && in_vim9script()
4782 && !(eap->argt & EX_NOTRLCOM) 4782 && !(eap->argt & EX_NOTRLCOM)
4783 && p[1] != '{'
4784 && p > eap->cmd && VIM_ISWHITE(p[-1])) 4783 && p > eap->cmd && VIM_ISWHITE(p[-1]))
4785 #endif 4784 #endif
4786 || *p == '|' || *p == '\n') 4785 || *p == '|' || *p == '\n')
4787 { 4786 {
4788 /* 4787 /*