@@ -1486,7 +1486,7 @@ ex_let_const(exarg_T *eap, int is_const)
1486
1486
/*
1487
1487
* Assign the typevalue "tv" to the variable or variables at "arg_start".
1488
1488
* Handles both "var" with any type and "[var, var; var]" with a list type.
1489
- * When "nextchars " is not NULL it points to a string with characters that
1489
+ * When "op " is not NULL it points to a string with characters that
1490
1490
* must appear after the variable(s). Use "+", "-" or "." for add, subtract
1491
1491
* or concatenate.
1492
1492
* Returns OK or FAIL;
@@ -1499,7 +1499,7 @@ ex_let_vars(
1499
1499
int semicolon , // from skip_var_list()
1500
1500
int var_count , // from skip_var_list()
1501
1501
int is_const , // lock variables for const
1502
- char_u * nextchars )
1502
+ char_u * op )
1503
1503
{
1504
1504
char_u * arg = arg_start ;
1505
1505
list_T * l ;
@@ -1512,7 +1512,7 @@ ex_let_vars(
1512
1512
/*
1513
1513
* ":let var = expr" or ":for var in list"
1514
1514
*/
1515
- if (ex_let_one (arg , tv , copy , is_const , nextchars , nextchars ) == NULL )
1515
+ if (ex_let_one (arg , tv , copy , is_const , op , op ) == NULL )
1516
1516
return FAIL ;
1517
1517
return OK ;
1518
1518
}
@@ -1543,7 +1543,7 @@ ex_let_vars(
1543
1543
{
1544
1544
arg = skipwhite (arg + 1 );
1545
1545
arg = ex_let_one (arg , & item -> li_tv , TRUE, is_const ,
1546
- (char_u * )",;]" , nextchars );
1546
+ (char_u * )",;]" , op );
1547
1547
item = item -> li_next ;
1548
1548
if (arg == NULL )
1549
1549
return FAIL ;
@@ -1568,7 +1568,7 @@ ex_let_vars(
1568
1568
l -> lv_refcount = 1 ;
1569
1569
1570
1570
arg = ex_let_one (skipwhite (arg + 1 ), & ltv , FALSE, is_const ,
1571
- (char_u * )"]" , nextchars );
1571
+ (char_u * )"]" , op );
1572
1572
clear_tv (& ltv );
1573
1573
if (arg == NULL )
1574
1574
return FAIL ;
@@ -7355,9 +7355,14 @@ handle_subscript(
7355
7355
int len ;
7356
7356
typval_T functv ;
7357
7357
7358
+ // "." is ".name" lookup when we found a dict or when evaluating and
7359
+ // scriptversion is at least 2, where string concatenation is "..".
7358
7360
while (ret == OK
7359
7361
&& (* * arg == '['
7360
- || (* * arg == '.' && rettv -> v_type == VAR_DICT )
7362
+ || (* * arg == '.' && (rettv -> v_type == VAR_DICT
7363
+ || (!evaluate
7364
+ && (* arg )[1 ] != '.'
7365
+ && current_sctx .sc_version >= 2 )))
7361
7366
|| (* * arg == '(' && (!evaluate || rettv -> v_type == VAR_FUNC
7362
7367
|| rettv -> v_type == VAR_PARTIAL )))
7363
7368
&& !VIM_ISWHITE (* (* arg - 1 )))
0 commit comments