0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2742: Vim9: when compiling a function fails it is cleared

Problem:    Vim9: when compiling a function fails it is cleared.
Solution:   Keep the function lines, prevent execution with a different
            status. (closes #8093)
This commit is contained in:
Bram Moolenaar
2021-04-10 13:33:48 +02:00
parent 1088b69451
commit 701cc6ca9e
5 changed files with 34 additions and 13 deletions

View File

@@ -1297,6 +1297,7 @@ call_def_function(
#define STACK_TV_VAR(idx) (((typval_T *)ectx.ec_stack.ga_data) + ectx.ec_frame_idx + STACK_FRAME_SIZE + idx)
if (ufunc->uf_def_status == UF_NOT_COMPILED
|| ufunc->uf_def_status == UF_COMPILE_ERROR
|| (func_needs_compiling(ufunc, PROFILING(ufunc))
&& compile_def_function(ufunc, FALSE, PROFILING(ufunc), NULL)
== FAIL))