patch 8.2.3235: cannot use lambda in {} block in user command
Problem: Cannot use lambda in {} block in user command. (Martin Tournoij)
Solution: Do not go over the end of the lambda.
diff --git a/src/userfunc.c b/src/userfunc.c
index 7c96347..e008718 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1398,7 +1398,7 @@
// If there are line breaks, we need to split up the string.
line_end = vim_strchr(start, '\n');
- if (line_end == NULL)
+ if (line_end == NULL || line_end > end)
line_end = end;
// Add "return " before the expression (or the first line).