forked from aniani/vim
patch 8.2.2743: Vim9: function state stuck when compiling with ":silent!"
Problem: Vim9: function state stuck when compiling with ":silent!". Solution: Check for uf_def_status to be UF_COMPILING.
This commit is contained in:
@@ -2603,6 +2603,20 @@ def Test_compile_error()
|
||||
|
||||
# Second call won't try compiling again
|
||||
assert_fails('call g:Broken()', 'E1091: Function is not compiled: Broken')
|
||||
delfunc g:Broken
|
||||
|
||||
# No error when compiling with :silent!
|
||||
lines =<< trim END
|
||||
def g:Broken()
|
||||
echo 'a' + []
|
||||
enddef
|
||||
silent! defcompile
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
# Calling the function won't try compiling again
|
||||
assert_fails('call g:Broken()', 'E1091: Function is not compiled: Broken')
|
||||
delfunc g:Broken
|
||||
enddef
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user