mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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 #7456)
This commit is contained in:
@@ -1683,7 +1683,7 @@ comment_start(char_u *p, int starts_with_colon UNUSED)
|
|||||||
{
|
{
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
if (in_vim9script())
|
if (in_vim9script())
|
||||||
return p[0] == '#' && p[1] != '{' && !starts_with_colon;
|
return p[0] == '#' && !starts_with_colon;
|
||||||
#endif
|
#endif
|
||||||
return *p == '"';
|
return *p == '"';
|
||||||
}
|
}
|
||||||
@@ -4780,7 +4780,6 @@ separate_nextcmd(exarg_T *eap)
|
|||||||
|| (*p == '#'
|
|| (*p == '#'
|
||||||
&& in_vim9script()
|
&& in_vim9script()
|
||||||
&& !(eap->argt & EX_NOTRLCOM)
|
&& !(eap->argt & EX_NOTRLCOM)
|
||||||
&& p[1] != '{'
|
|
||||||
&& p > eap->cmd && VIM_ISWHITE(p[-1]))
|
&& p > eap->cmd && VIM_ISWHITE(p[-1]))
|
||||||
#endif
|
#endif
|
||||||
|| *p == '|' || *p == '\n')
|
|| *p == '|' || *p == '\n')
|
||||||
|
@@ -2069,7 +2069,21 @@ def Test_vim9_comment()
|
|||||||
CheckScriptSuccess([
|
CheckScriptSuccess([
|
||||||
'vim9script',
|
'vim9script',
|
||||||
'# something',
|
'# something',
|
||||||
|
'#something',
|
||||||
|
'#{something',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
split Xfile
|
||||||
|
CheckScriptSuccess([
|
||||||
|
'vim9script',
|
||||||
|
'edit #something',
|
||||||
|
])
|
||||||
|
CheckScriptSuccess([
|
||||||
|
'vim9script',
|
||||||
|
'edit #{something',
|
||||||
|
])
|
||||||
|
close
|
||||||
|
|
||||||
CheckScriptFailure([
|
CheckScriptFailure([
|
||||||
'vim9script',
|
'vim9script',
|
||||||
':# something',
|
':# something',
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2135,
|
||||||
/**/
|
/**/
|
||||||
2134,
|
2134,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user