Mercurial > vim
diff runtime/doc/vim9.txt @ 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 | b3142fc0a414 |
children | 517fca70e084 |
line wrap: on
line diff
--- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -219,23 +219,6 @@ some point when loaded again. E.g. when def g:SomeFunc() .... -There is one gotcha: If a compiled function is replaced and it is called from -another compiled function that is not replaced, it will try to call the -function from before it was replaced, which no longer exists. This doesn't -work: > - vimscript noclear - - def ReplaceMe() - echo 'function redefined every time' - enddef - - if exists('s:loaded') | finish | endif - var s:loaded = true - - def NotReplaced() - ReplaceMe() # Error if ReplaceMe() was redefined - enddef - Variable declarations with :var, :final and :const ~ *vim9-declaration* *:var*