patch 8.2.0104: using channel or job with ":execute" has strange effects
Problem: Using channel or job with ":execute" has strange effects.
Solution: Give an error message for Job and Channel.
diff --git a/src/eval.c b/src/eval.c
index e0f27a0..f8ba4df 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6055,7 +6055,15 @@
char_u buf[NUMBUFLEN];
if (eap->cmdidx == CMD_execute)
- p = tv_get_string_buf(&rettv, buf);
+ {
+ if (rettv.v_type == VAR_CHANNEL || rettv.v_type == VAR_JOB)
+ {
+ emsg(_(e_inval_string));
+ p = NULL;
+ }
+ else
+ p = tv_get_string_buf(&rettv, buf);
+ }
else
p = tv_stringify(&rettv, buf);
if (p == NULL)