Patch 8.2.0104
Problem: Using channel or job with ":execute" has strange effects.
Solution: Give an error message for Job and Channel.
Files: src/testdir/test_eval_stuff.vim, src/eval.c
*** ../vim-8.2.0103/src/testdir/test_eval_stuff.vim 2019-09-15
21:10:45.000000000 +0200
--- src/testdir/test_eval_stuff.vim 2020-01-08 20:06:05.902833739 +0100
***************
*** 216,218 ****
--- 216,230 ----
call assert_fails('source Xversionscript', 'E999:')
call delete('Xversionscript')
endfunc
+
+ func Test_excute_null()
+ call assert_fails('execute test_null_list()', 'E730:')
+ call assert_fails('execute test_null_dict()', 'E731:')
+ call assert_fails('execute test_null_blob()', 'E976:')
+ execute test_null_string()
+ call assert_fails('execute test_null_partial()', 'E729:')
+ if has('job')
+ call assert_fails('execute test_null_job()', 'E908:')
+ call assert_fails('execute test_null_channel()', 'E908:')
+ endif
+ endfunc
*** ../vim-8.2.0103/src/eval.c 2020-01-08 19:32:14.966527459 +0100
--- src/eval.c 2020-01-08 20:05:07.459055930 +0100
***************
*** 6055,6061 ****
char_u buf[NUMBUFLEN];
if (eap->cmdidx == CMD_execute)
! p = tv_get_string_buf(&rettv, buf);
else
p = tv_stringify(&rettv, buf);
if (p == NULL)
--- 6055,6069 ----
char_u buf[NUMBUFLEN];
if (eap->cmdidx == CMD_execute)
! {
! 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)
*** ../vim-8.2.0103/src/version.c 2020-01-08 19:32:14.970527443 +0100
--- src/version.c 2020-01-08 20:05:04.811065996 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 104,
/**/
--
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
[real standing law in Massachusetts, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202001081909.008J9VvS020820%40masaka.moolenaar.net.