diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-07-12 10:17:30 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-07-19 11:40:34 -0400 |
commit | 93f2dc0d034677a47c9ba7032b3537c91a718096 (patch) | |
tree | 0483af40f89a2f15118a28cffadb43ec07337a2d /src/nvim/eval.c | |
parent | ab69ea26dccf4760a60882059a69b9245f767e2c (diff) | |
download | rneovim-93f2dc0d034677a47c9ba7032b3537c91a718096.tar.gz rneovim-93f2dc0d034677a47c9ba7032b3537c91a718096.tar.bz2 rneovim-93f2dc0d034677a47c9ba7032b3537c91a718096.zip |
vim-patch:8.2.0893: assert_equalfile() does not take a third argument
Problem: Assert_equalfile() does not take a third argument.
Solution: Implement the third argument. (Gary Johnson)
https://github.com/vim/vim/commit/fb517bac2384798bb5142ed1f75f965f93984c0a
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index db9d0d987c..12c904bc1b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -5739,6 +5739,12 @@ int assert_equalfile(typval_T *argvars) } if (IObuff[0] != NUL) { prepare_assert_error(&ga); + if (argvars[2].v_type != VAR_UNKNOWN) { + char *const tofree = encode_tv2echo(&argvars[2], NULL); + ga_concat(&ga, (char_u *)tofree); + xfree(tofree); + ga_concat(&ga, (char_u *)": "); + } ga_concat(&ga, IObuff); assert_error(&ga); ga_clear(&ga); |