comparison src/userfunc.c @ 23360:eb7d8f39363c v8.2.2223

patch 8.2.2223: Vim9: Reloading marks a :def function as deleted Commit: https://github.com/vim/vim/commit/cdc40c43f1008bda2f173d3a13606236679e8067 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 26 17:43:08 2020 +0100 patch 8.2.2223: Vim9: Reloading marks a :def function as deleted Problem: Vim9: Reloading marks a :def function as deleted. Solution: Clear the function contents but keep the index.
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Dec 2020 17:45:03 +0100
parents 611e19cd237d
children a7cbdb9294c4
comparison
equal deleted inserted replaced
23359:35b42d31593d 23360:eb7d8f39363c
3626 fp->uf_flags &= ~FC_DEAD; 3626 fp->uf_flags &= ~FC_DEAD;
3627 #ifdef FEAT_PROFILE 3627 #ifdef FEAT_PROFILE
3628 fp->uf_profiling = FALSE; 3628 fp->uf_profiling = FALSE;
3629 fp->uf_prof_initialized = FALSE; 3629 fp->uf_prof_initialized = FALSE;
3630 #endif 3630 #endif
3631 unlink_def_function(fp); 3631 fp->uf_def_status = UF_NOT_COMPILED;
3632 } 3632 }
3633 } 3633 }
3634 } 3634 }
3635 else 3635 else
3636 { 3636 {
3692 } 3692 }
3693 3693
3694 fp = alloc_clear(offsetof(ufunc_T, uf_name) + STRLEN(name) + 1); 3694 fp = alloc_clear(offsetof(ufunc_T, uf_name) + STRLEN(name) + 1);
3695 if (fp == NULL) 3695 if (fp == NULL)
3696 goto erret; 3696 goto erret;
3697 fp->uf_def_status = eap->cmdidx == CMD_def ? UF_TO_BE_COMPILED
3698 : UF_NOT_COMPILED;
3699 3697
3700 if (fudi.fd_dict != NULL) 3698 if (fudi.fd_dict != NULL)
3701 { 3699 {
3702 if (fudi.fd_di == NULL) 3700 if (fudi.fd_di == NULL)
3703 { 3701 {