Patch 8.2.1516
Problem: Vim9: error for :exe has wrong line number.
Solution: Set line number before calling do_cmdline_cmd(). (closes #6774)
Files: src/vim9execute.c, src/testdir/test_vim9_script.vim
*** ../vim-8.2.1515/src/vim9execute.c 2020-08-18 20:34:09.014182209 +0200
--- src/vim9execute.c 2020-08-23 16:24:08.726347777 +0200
***************
*** 1062,1068 ****
--- 1062,1071 ----
if (ga.ga_data != NULL)
{
if (iptr->isn_type == ISN_EXECUTE)
+ {
+ SOURCING_LNUM = iptr->isn_lnum;
do_cmdline_cmd((char_u *)ga.ga_data);
+ }
else
{
msg_sb_eol();
*** ../vim-8.2.1515/src/testdir/test_vim9_script.vim 2020-08-23
15:21:52.054677261 +0200
--- src/testdir/test_vim9_script.vim 2020-08-23 16:27:41.017513343 +0200
***************
*** 2159,2166 ****
echomsg [1, 2, 3] #{a: 1, b: 2}
assert_match('^\[1, 2, 3\] {''a'': 1, ''b'': 2}$', Screenline(&lines))
! call CheckDefFailure(['execute xxx'], 'E1001:')
! call CheckDefFailure(['execute "cmd"# comment'], 'E488:')
enddef
def Test_execute_cmd_vimscript()
--- 2159,2167 ----
echomsg [1, 2, 3] #{a: 1, b: 2}
assert_match('^\[1, 2, 3\] {''a'': 1, ''b'': 2}$', Screenline(&lines))
! call CheckDefFailure(['execute xxx'], 'E1001:', 1)
! call CheckDefExecFailure(['execute "tabnext " .. 8'], 'E475:', 1)
! call CheckDefFailure(['execute "cmd"# comment'], 'E488:', 1)
enddef
def Test_execute_cmd_vimscript()
*** ../vim-8.2.1515/src/version.c 2020-08-23 15:21:52.054677261 +0200
--- src/version.c 2020-08-23 16:25:13.126093429 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1516,
/**/
--
We're knights of the Round Table
Our shows are formidable
But many times
We're given rhymes
That are quite unsingable
We're opera mad in Camelot
We sing from the diaphragm a lot.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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/202008231429.07NETjKT994279%40masaka.moolenaar.net.