diff src/testing.c @ 20189:63cc54100ae4 v8.2.0650

patch 8.2.0650: Vim9: script function can be deleted Commit: https://github.com/vim/vim/commit/4c17ad94ecb0a0fb26d6fface2614bc5172dea18 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 27 22:47:51 2020 +0200 patch 8.2.0650: Vim9: script function can be deleted Problem: Vim9: script function can be deleted. Solution: Disallow deleting script function. Delete functions when sourcing a script again.
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Apr 2020 23:00:03 +0200
parents 1f42c49c3d29
children 1af1d8ff2aa8
line wrap: on
line diff
--- a/src/testing.c
+++ b/src/testing.c
@@ -789,7 +789,7 @@ f_test_refcount(typval_T *argvars, typva
 	    {
 		ufunc_T *fp;
 
-		fp = find_func(argvars[0].vval.v_string, NULL);
+		fp = find_func(argvars[0].vval.v_string, FALSE, NULL);
 		if (fp != NULL)
 		    retval = fp->uf_refcount;
 	    }