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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user