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):
1183
1183
varnode .pos = token .pos
1184
1184
varnode .value = token .value
1185
1185
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 ()))
1188
1189
token = tokenizer .get ()
1189
1190
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 ))
1193
1191
# XXX: Vim allows last comma. F(a, b, ) => OK
1194
1192
if tokenizer .peek ().type == TOKEN_PCLOSE :
1195
1193
tokenizer .get ()
@@ -2673,7 +2671,7 @@ def __init__(self, lines):
2673
2671
skip = 0
2674
2672
else :
2675
2673
viml_add (self .buf , c )
2676
- viml_add (self .pos , [lnum + 1 , col + 1 ])
2674
+ viml_add (self .pos , [lnum + 2 , col + 1 ])
2677
2675
col += viml_len (c )
2678
2676
lnum += 1
2679
2677
viml_add (self .buf , "<EOL>" )
You can’t perform that action at this time.
0 commit comments