comparison src/eval.c @ 19087:e3848b251a01 v8.2.0104

patch 8.2.0104: using channel or job with ":execute" has strange effects Commit: https://github.com/vim/vim/commit/b662591e505e8523634a1c8ddfb7fe44fae880c6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 8 20:09:01 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Jan 2020 20:15:03 +0100
parents fd1070ff696b
children ba9f50bfda83
comparison
equal deleted inserted replaced
19086:8225fdd8fe14 19087:e3848b251a01
6053 if (!eap->skip) 6053 if (!eap->skip)
6054 { 6054 {
6055 char_u buf[NUMBUFLEN]; 6055 char_u buf[NUMBUFLEN];
6056 6056
6057 if (eap->cmdidx == CMD_execute) 6057 if (eap->cmdidx == CMD_execute)
6058 p = tv_get_string_buf(&rettv, buf); 6058 {
6059 if (rettv.v_type == VAR_CHANNEL || rettv.v_type == VAR_JOB)
6060 {
6061 emsg(_(e_inval_string));
6062 p = NULL;
6063 }
6064 else
6065 p = tv_get_string_buf(&rettv, buf);
6066 }
6059 else 6067 else
6060 p = tv_stringify(&rettv, buf); 6068 p = tv_stringify(&rettv, buf);
6061 if (p == NULL) 6069 if (p == NULL)
6062 { 6070 {
6063 clear_tv(&rettv); 6071 clear_tv(&rettv);