aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-05 12:41:36 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-05 12:45:43 +0800
commit02f80d9a8a560a93142bcebf324ba14cde4dd1b5 (patch)
tree3a581c5518bdd20b09a70afa944b3325c96fe824 /src/nvim/message.c
parent8ba7a966a1339767b19a5ca4449b38ef0cae49c7 (diff)
downloadrneovim-02f80d9a8a560a93142bcebf324ba14cde4dd1b5.tar.gz
rneovim-02f80d9a8a560a93142bcebf324ba14cde4dd1b5.tar.bz2
rneovim-02f80d9a8a560a93142bcebf324ba14cde4dd1b5.zip
vim-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. https://github.com/vim/vim/commit/9bd5d879c2ecfbdbb168b090e12f4b89724a302e Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index c95968afb4..fa1c8036e6 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -666,6 +666,8 @@ static bool emsg_multiline(const char *s, bool multiline)
if (emsg_assert_fails_used && emsg_assert_fails_msg == NULL) {
emsg_assert_fails_msg = xstrdup(s);
emsg_assert_fails_lnum = SOURCING_LNUM;
+ xfree(emsg_assert_fails_context);
+ emsg_assert_fails_context = xstrdup(SOURCING_NAME == NULL ? "" : SOURCING_NAME);
}
// set "v:errmsg", also when using ":silent! cmd"