File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1622,7 +1622,7 @@ VimLParser.prototype.parse_cmd_function = function() {
1622
1622
if ( left . type == NODE_IDENTIFIER ) {
1623
1623
var s = left . value ;
1624
1624
var ss = viml_split ( s , "\\zs" ) ;
1625
- if ( ss [ 0 ] != "<" && ! isupper ( ss [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
1625
+ if ( ss [ 0 ] != "<" && ss [ 0 ] != "_" && ! isupper ( ss [ 0 ] ) && viml_stridx ( s , ":" ) == - 1 && viml_stridx ( s , "#" ) == - 1 ) {
1626
1626
throw Err ( viml_printf ( "E128: Function name must start with a capital or contain a colon: %s" , s ) , left . pos ) ;
1627
1627
}
1628
1628
}
Original file line number Diff line number Diff line change @@ -1338,7 +1338,7 @@ def parse_cmd_function(self):
1338
1338
if left .type == NODE_IDENTIFIER :
1339
1339
s = left .value
1340
1340
ss = viml_split (s , "\\ zs" )
1341
- if ss [0 ] != "<" and not isupper (ss [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
1341
+ if ss [0 ] != "<" and ss [ 0 ] != "_" and not isupper (ss [0 ]) and viml_stridx (s , ":" ) == - 1 and viml_stridx (s , "#" ) == - 1 :
1342
1342
raise VimLParserException (Err (viml_printf ("E128: Function name must start with a capital or contain a colon: %s" , s ), left .pos ))
1343
1343
# :function {name}
1344
1344
if self .reader .peekn (1 ) != "(" :
You can’t perform that action at this time.
0 commit comments