patch 8.2.3965: Vim9: no easy way to check if Vim9 script is supported
Problem: Vim9: no easy way to check if Vim9 script is supported.
Solution: Add has('vim9script').
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 1dde731..e79e06e 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -391,8 +391,8 @@
endif
enddef
-If you would do it like this you get an error at compile time that
-"PluginFunc" does not exist, even when "g:loaded_plugin" does not exist: >
+If you do it like this, you get an error at compile time that "PluginFunc"
+does not exist, even when "g:loaded_plugin" does not exist: >
def CallPluginFunc()
if exists('g:loaded_plugin')
PluginFunc() # Error - function not found
@@ -1411,9 +1411,6 @@
2. The "if" statement evaluates to true, the commands up to `endif` are
executed and `finish` bails out before reaching `vim9script`.
-TODO: The "vim9script" feature does not exist yet, it will only be added once
-the Vim9 script syntax has been fully implemented.
-
Export ~
*:export* *:exp*