Patch 8.2.1516

5 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 23, 2020, 10:29:53 AM8/23/20
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- 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 ///
Reply all
Reply to author
Forward
0 new messages