summaryrefslogtreecommitdiffstats
path: root/src/vim9execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r--src/vim9execute.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c
index b3e89396e8..5af3af68ba 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1638,7 +1638,7 @@ store_var(char_u *name, typval_T *tv)
* Return FAIL if not allowed.
*/
static int
-do_2string(typval_T *tv, int is_2string_any, int tolerant)
+do_2string(typval_T *tv, int is_2string_any, int tostring_flags)
{
if (tv->v_type == VAR_STRING)
return OK;
@@ -1657,7 +1657,7 @@ do_2string(typval_T *tv, int is_2string_any, int tolerant)
case VAR_BLOB: break;
case VAR_LIST:
- if (tolerant)
+ if (tostring_flags & TOSTRING_TOLERANT)
{
char_u *s, *e, *p;
garray_T ga;
@@ -1690,6 +1690,8 @@ do_2string(typval_T *tv, int is_2string_any, int tolerant)
tv->vval.v_string = ga.ga_data;
return OK;
}
+ if (tostring_flags & TOSTRING_INTERPOLATE)
+ break;
// FALLTHROUGH
default: to_string_error(tv->v_type);
return FAIL;
@@ -5685,7 +5687,7 @@ exec_instructions(ectx_T *ectx)
SOURCING_LNUM = iptr->isn_lnum;
if (do_2string(STACK_TV_BOT(iptr->isn_arg.tostring.offset),
iptr->isn_type == ISN_2STRING_ANY,
- iptr->isn_arg.tostring.tolerant) == FAIL)
+ iptr->isn_arg.tostring.flags) == FAIL)
goto on_error;
break;