0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.1631: test_fails() does not check the context of the line number

Problem:    test_fails() does not check the context of the line number.
Solution:   Use another argument to specify the context of the line number.
This commit is contained in:
Bram Moolenaar
2020-09-06 21:47:48 +02:00
parent c98cdb3bc9
commit 9bd5d879c2
7 changed files with 50 additions and 26 deletions

View File

@@ -658,6 +658,9 @@ emsg_core(char_u *s)
{
emsg_assert_fails_msg = vim_strsave(s);
emsg_assert_fails_lnum = SOURCING_LNUM;
vim_free(emsg_assert_fails_context);
emsg_assert_fails_context = vim_strsave(
SOURCING_NAME == NULL ? (char_u *)"" : SOURCING_NAME);
}
// set "v:errmsg", also when using ":silent! cmd"