aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval/userfunc.c11
-rw-r--r--src/nvim/eval/userfunc.h6
-rw-r--r--src/nvim/runtime.c4
3 files changed, 10 insertions, 11 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 67b1e53a35..9705bc93db 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -2015,12 +2015,11 @@ static void list_functions(regmatch_T *regmatch)
if (!HASHITEM_EMPTY(hi)) {
ufunc_T *fp = HI2UF(hi);
todo--;
- if ((fp->uf_flags & FC_DEAD) == 0
- && (regmatch == NULL
- ? (!message_filtered(fp->uf_name)
- && !func_name_refcount(fp->uf_name))
- : (!isdigit((uint8_t)(*fp->uf_name))
- && vim_regexec(regmatch, fp->uf_name, 0)))) {
+ if (regmatch == NULL
+ ? (!message_filtered(fp->uf_name)
+ && !func_name_refcount(fp->uf_name))
+ : (!isdigit((uint8_t)(*fp->uf_name))
+ && vim_regexec(regmatch, fp->uf_name, 0))) {
list_func_head(fp, false, false);
if (changed != func_hashtab.ht_changed) {
emsg(_("E454: function list was modified"));
diff --git a/src/nvim/eval/userfunc.h b/src/nvim/eval/userfunc.h
index f0e1f5dca0..d0ad53c43d 100644
--- a/src/nvim/eval/userfunc.h
+++ b/src/nvim/eval/userfunc.h
@@ -28,10 +28,10 @@ struct funccal_entry;
#define FC_DELETED 0x10 // :delfunction used while uf_refcount > 0
#define FC_REMOVED 0x20 // function redefined while uf_refcount > 0
#define FC_SANDBOX 0x40 // function defined in the sandbox
-#define FC_DEAD 0x80 // function kept only for reference to dfunc
-#define FC_EXPORT 0x100 // "export def Func()"
+// #define FC_DEAD 0x80 // function kept only for reference to dfunc
+// #define FC_EXPORT 0x100 // "export def Func()"
#define FC_NOARGS 0x200 // no a: variables in lambda
-#define FC_VIM9 0x400 // defined in vim9 script file
+// #define FC_VIM9 0x400 // defined in vim9 script file
#define FC_LUAREF 0x800 // luaref callback
/// Structure used by trans_function_name()
diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c
index 3eba2318ec..d091636e77 100644
--- a/src/nvim/runtime.c
+++ b/src/nvim/runtime.c
@@ -2368,8 +2368,8 @@ static list_T *get_script_local_funcs(scid_T sid)
// looking for functions with script ID "sid".
HASHTAB_ITER(functbl, hi, {
const ufunc_T *const fp = HI2UF(hi);
- // Add active functions with script id == "sid"
- if (!(fp->uf_flags & FC_DEAD) && (fp->uf_script_ctx.sc_sid == sid)) {
+ // Add functions with script id == "sid"
+ if (fp->uf_script_ctx.sc_sid == sid) {
const char *const name = fp->uf_name_exp != NULL ? fp->uf_name_exp : fp->uf_name;
tv_list_append_string(l, name, -1);
}