From 1ca2247639424994890ef70ab34f2bffa23ddd9f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 Aug 2022 17:52:04 +0800 Subject: vim-patch:8.2.0823: Vim9: script reload test is disabled Problem: Vim9: script reload test is disabled. Solution: Compile a function in the context of the script where it was defined. Set execution stack for compiled function. Add a test that an error is reported for the right file/function. https://github.com/vim/vim/commit/25e0f5863e9010a75a1ff0d04e8f886403968755 Omit stack_top_is_ufunc(): only used by Vim9 script. --- src/nvim/runtime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/runtime.c') diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c index c9b5051a30..8299f8ec45 100644 --- a/src/nvim/runtime.c +++ b/src/nvim/runtime.c @@ -80,9 +80,9 @@ estack_T *estack_push(etype_T type, char *name, linenr_T lnum) } /// Add a user function to the execution stack. -void estack_push_ufunc(etype_T type, ufunc_T *ufunc, linenr_T lnum) +void estack_push_ufunc(ufunc_T *ufunc, linenr_T lnum) { - estack_T *entry = estack_push(type, + estack_T *entry = estack_push(ETYPE_UFUNC, (char *)(ufunc->uf_name_exp != NULL ? ufunc->uf_name_exp : ufunc->uf_name), lnum); -- cgit