mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1479: Vim9: error for list index uses wrong line number
Problem: Vim9: error for list index uses wrong line number. Solution: Set source line number. (closes #6724) Add a way to assert the line number of the error with assert_fails().
This commit is contained in:
@@ -655,7 +655,10 @@ emsg_core(char_u *s)
|
||||
}
|
||||
|
||||
if (emsg_assert_fails_used && emsg_assert_fails_msg == NULL)
|
||||
{
|
||||
emsg_assert_fails_msg = vim_strsave(s);
|
||||
emsg_assert_fails_lnum = SOURCING_LNUM;
|
||||
}
|
||||
|
||||
// set "v:errmsg", also when using ":silent! cmd"
|
||||
set_vim_var_string(VV_ERRMSG, s, -1);
|
||||
|
Reference in New Issue
Block a user