@@ -368,12 +368,12 @@ eval_to_string_skip(
368368 * Return FAIL for an error, OK otherwise.
369369 */
370370 int
371- skip_expr (char_u * * pp )
371+ skip_expr (char_u * * pp , evalarg_T * evalarg )
372372{
373373 typval_T rettv ;
374374
375375 * pp = skipwhite (* pp );
376- return eval1 (pp , & rettv , NULL );
376+ return eval1 (pp , & rettv , evalarg );
377377}
378378
379379/*
@@ -2679,6 +2679,9 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
26792679 return OK ;
26802680}
26812681
2682+ /*
2683+ * Make a copy of blob "tv1" and append blob "tv2".
2684+ */
26822685 void
26832686eval_addblob (typval_T * tv1 , typval_T * tv2 )
26842687{
@@ -2699,6 +2702,9 @@ eval_addblob(typval_T *tv1, typval_T *tv2)
26992702 }
27002703}
27012704
2705+ /*
2706+ * Make a copy of list "tv1" and append list "tv2".
2707+ */
27022708 int
27032709eval_addlist (typval_T * tv1 , typval_T * tv2 )
27042710{
@@ -2777,16 +2783,20 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
27772783#ifdef FEAT_FLOAT
27782784 && (op == '.' || rettv -> v_type != VAR_FLOAT )
27792785#endif
2780- )
2786+ && evaluate )
27812787 {
2788+ int error = FALSE;
2789+
27822790 // For "list + ...", an illegal use of the first operand as
27832791 // a number cannot be determined before evaluating the 2nd
27842792 // operand: if this is also a list, all is ok.
27852793 // For "something . ...", "something - ..." or "non-list + ...",
27862794 // we know that the first operand needs to be a string or number
27872795 // without evaluating the 2nd operand. So check before to avoid
27882796 // side effects after an error.
2789- if (evaluate && tv_get_string_chk (rettv ) == NULL )
2797+ if (op != '.' )
2798+ tv_get_number_chk (rettv , & error );
2799+ if ((op == '.' && tv_get_string_chk (rettv ) == NULL ) || error )
27902800 {
27912801 clear_tv (rettv );
27922802 return FAIL ;
0 commit comments