0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.2.0103: using null object with execute() has strange effects

Problem:    Using null object with execute() has strange effects.
Solution:   Give an error message ofr Job and Channel.
This commit is contained in:
Bram Moolenaar
2020-01-08 19:32:18 +01:00
parent da292b07af
commit e2a8f0773e
5 changed files with 22 additions and 4 deletions

View File

@@ -2015,6 +2015,12 @@ execute_common(typval_T *argvars, typval_T *rettv, int arg_off)
return;
++list->lv_refcount;
}
else if (argvars[arg_off].v_type == VAR_JOB
|| argvars[arg_off].v_type == VAR_CHANNEL)
{
emsg(_(e_inval_string));
return;
}
else
{
cmd = tv_get_string_chk(&argvars[arg_off]);