0
0
mirror of https://github.com/vim/vim.git synced 2025-11-07 10:17:28 -05:00

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.
This commit is contained in:
Bram Moolenaar
2020-04-27 22:47:51 +02:00
parent db93495d27
commit 4c17ad94ec
12 changed files with 219 additions and 81 deletions

View File

@@ -353,7 +353,7 @@ endfunc
def Test_delfunc()
let lines =<< trim END
vim9script
def GoneSoon()
def g:GoneSoon()
echo 'hello'
enddef
@@ -361,7 +361,7 @@ def Test_delfunc()
GoneSoon()
enddef
delfunc GoneSoon
delfunc g:GoneSoon
CallGoneSoon()
END
writefile(lines, 'XToDelFunc')