patch 8.2.0562: Vim9: cannot split an expression into multiple lines
Problem: Vim9: cannot split an expression into multiple lines.
Solution: Continue in next line after an operator.
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index c7286ec..1d7aec9 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -195,6 +195,18 @@
arg2
)
+For binary operators iin expressions not in [], {} or () a line break is
+possible AFTER the operators. For example: >
+ let text = lead ..
+ middle ..
+ end
+ let total = start +
+ end -
+ correction
+ let result = positive ?
+ PosFunc(arg) :
+ NegFunc(arg)
+
Note that "enddef" cannot be used at the start of a continuation line, it ends
the current function.