diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-14 09:11:37 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-04-14 09:42:59 +0800 |
commit | 8e2903d2fe810cfa3be41fc1e7a4d8394c84cf11 (patch) | |
tree | 3a18b8a3e608394451044181ca4368133635027d /src/nvim/eval/userfunc.c | |
parent | bd83b587b18bb6f2ac555a992fa5b7d907de7e79 (diff) | |
download | rneovim-8e2903d2fe810cfa3be41fc1e7a4d8394c84cf11.tar.gz rneovim-8e2903d2fe810cfa3be41fc1e7a4d8394c84cf11.tar.bz2 rneovim-8e2903d2fe810cfa3be41fc1e7a4d8394c84cf11.zip |
vim-patch:8.2.1049: Vim9: leaking memory when using continuation line
Problem: Vim9: leaking memory when using continuation line.
Solution: Keep a pointer to the continuation line in evalarg_T. Centralize
checking for a next command.
https://github.com/vim/vim/commit/b171fb179053fa631fec74911b5fb9374cb6a8a1
Omit eval_next_line(): Vim9 script only.
vim-patch:8.2.1050: missing change in struct
Problem: Missing change in struct.
Solution: Add missing change.
https://github.com/vim/vim/commit/65a8ed37f7bc61fbe5c612a7b0eb0dfc16ad3e11
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r-- | src/nvim/eval/userfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index d994a31039..fe0249ea3a 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -2957,7 +2957,7 @@ void ex_return(exarg_T *eap) eap->nextcmd = NULL; if ((*arg != NUL && *arg != '|' && *arg != '\n') - && eval0(arg, &rettv, &eap->nextcmd, &evalarg) != FAIL) { + && eval0(arg, &rettv, eap, &evalarg) != FAIL) { if (!eap->skip) { returning = do_return(eap, false, true, &rettv); } else { @@ -3008,7 +3008,7 @@ void ex_call(exarg_T *eap) // instead to skip to any following command, e.g. for: // :if 0 | call dict.foo().bar() | endif. emsg_skip++; - if (eval0(eap->arg, &rettv, &eap->nextcmd, NULL) != FAIL) { + if (eval0(eap->arg, &rettv, eap, NULL) != FAIL) { tv_clear(&rettv); } emsg_skip--; |