File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1183,13 +1183,11 @@ def parse_cmd_function(self):
11831183 varnode .pos = token .pos
11841184 varnode .value = token .value
11851185 viml_add (node .rlist , varnode )
1186- pc = self .reader .p (0 )
1187- ppos = self .reader .getpos ()
1186+ # XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
1187+ if iswhite (self .reader .p (0 )) and tokenizer .peek ().type == TOKEN_COMMA :
1188+ raise VimLParserException (Err ("E475: Invalid argument: White space is not allowed before comma" , self .reader .getpos ()))
11881189 token = tokenizer .get ()
11891190 if token .type == TOKEN_COMMA :
1190- # XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
1191- if iswhite (pc ):
1192- raise VimLParserException (Err ("E475: Invalid argument: White space is not allowed before comma" , ppos ))
11931191 # XXX: Vim allows last comma. F(a, b, ) => OK
11941192 if tokenizer .peek ().type == TOKEN_PCLOSE :
11951193 tokenizer .get ()
@@ -2673,7 +2671,7 @@ def __init__(self, lines):
26732671 skip = 0
26742672 else :
26752673 viml_add (self .buf , c )
2676- viml_add (self .pos , [lnum + 1 , col + 1 ])
2674+ viml_add (self .pos , [lnum + 2 , col + 1 ])
26772675 col += viml_len (c )
26782676 lnum += 1
26792677 viml_add (self .buf , "<EOL>" )
You can’t perform that action at this time.
0 commit comments