File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1454,14 +1454,12 @@ VimLParser.prototype.parse_cmd_function = function() {
14541454 varnode . pos = token . pos ;
14551455 varnode . value = token . value ;
14561456 viml_add ( node . rlist , varnode ) ;
1457- var pc = this . reader . p ( 0 ) ;
1458- var ppos = this . reader . getpos ( ) ;
1457+ // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
1458+ if ( iswhite ( this . reader . p ( 0 ) ) && tokenizer . peek ( ) . type == TOKEN_COMMA ) {
1459+ throw Err ( "E475: Invalid argument: White space is not allowed before comma" , this . reader . getpos ( ) ) ;
1460+ }
14591461 var token = tokenizer . get ( ) ;
14601462 if ( token . type == TOKEN_COMMA ) {
1461- // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
1462- if ( iswhite ( pc ) ) {
1463- throw Err ( "E475: Invalid argument: White space is not allowed before comma" , ppos ) ;
1464- }
14651463 // XXX: Vim allows last comma. F(a, b, ) => OK
14661464 if ( tokenizer . peek ( ) . type == TOKEN_PCLOSE ) {
14671465 tokenizer . get ( ) ;
@@ -3319,7 +3317,7 @@ StringReader.prototype.__init__ = function(lines) {
33193317 }
33203318 else {
33213319 viml_add ( this . buf , c ) ;
3322- viml_add ( this . pos , [ lnum + 1 , col + 1 ] ) ;
3320+ viml_add ( this . pos , [ lnum + 2 , col + 1 ] ) ;
33233321 }
33243322 col += viml_len ( c ) ;
33253323 }
You can’t perform that action at this time.
0 commit comments