diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-06 21:47:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-06 21:47:48 +0200 |
commit | 9bd5d879c2ecfbdbb168b090e12f4b89724a302e (patch) | |
tree | e9c9a342ba1d31c884d65edcbe864ba35518cf51 /src/message.c | |
parent | c98cdb3bc970f04f93b4c394b4ec94c2eb5546c3 (diff) |
patch 8.2.1631: test_fails() does not check the context of the line numberv8.2.1631
Problem: test_fails() does not check the context of the line number.
Solution: Use another argument to specify the context of the line number.
Diffstat (limited to 'src/message.c')
-rw-r--r-- | src/message.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/message.c b/src/message.c index 38e695900f..a9851efab0 100644 --- a/src/message.c +++ b/src/message.c @@ -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" |