END
v9.CheckScriptSuccess(lines)
delete('Xvim9import.vim')
+
+ # "legacy" does not aply to a called function
+ lines =<< trim END
+ vim9script
+
+ def g:TheFunc()
+ if exists('something')
+ echo 'yes'
+ endif
+ enddef
+ legacy exe 'call g:TheFunc()'
+ END
+ v9.CheckScriptSuccess(lines)
+ delfunc g:TheFunc
enddef
def Test_edit_wildcards()
{
sctx_T save_current_sctx;
int using_sandbox = FALSE;
+ int save_sticky_cmdmod_flags = sticky_cmdmod_flags;
funccall_T *fc;
int save_did_emsg;
int default_arg_err = FALSE;
if (do_profiling == PROF_YES)
profile_may_start_func(&profile_info, fp, caller);
#endif
+ sticky_cmdmod_flags = 0;
call_def_function(fp, argcount, argvars, funcexe->fe_partial, rettv);
funcdepth_decrement();
#ifdef FEAT_PROFILE
#endif
current_funccal = fc->caller;
free_funccal(fc);
+ sticky_cmdmod_flags = save_sticky_cmdmod_flags;
return;
}
fc->caller == NULL ? NULL : fc->caller->func);
#endif
+ // "legacy" does not apply to commands in the function
+ sticky_cmdmod_flags = 0;
+
save_current_sctx = current_sctx;
current_sctx = fp->uf_script_ctx;
save_did_emsg = did_emsg;
#endif
if (using_sandbox)
--sandbox;
+ sticky_cmdmod_flags = save_sticky_cmdmod_flags;
if (p_verbose >= 12 && SOURCING_NAME != NULL)
{