mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1516: Vim9: error for :exe has wrong line number
Problem: Vim9: error for :exe has wrong line number. Solution: Set line number before calling do_cmdline_cmd(). (closes #6774)
This commit is contained in:
@@ -2159,8 +2159,9 @@ def Test_execute_cmd()
|
||||
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:')
|
||||
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()
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1516,
|
||||
/**/
|
||||
1515,
|
||||
/**/
|
||||
|
@@ -1062,7 +1062,10 @@ call_def_function(
|
||||
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();
|
||||
|
Reference in New Issue
Block a user