patch 8.2.2242: Vim9: bar line continuation does not work at script level
Problem: Vim9: line continuation with bar does not work at script level.
Solution: Check for Vim9 script.
diff --git a/src/userfunc.c b/src/userfunc.c
index 85941d1..9393b62 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3292,7 +3292,7 @@
nesting = 0;
nesting_def[nesting] = (eap->cmdidx == CMD_def);
getline_options = eap->cmdidx == CMD_def
- ? GETLINE_CONCAT_CONTDEF : GETLINE_CONCAT_CONT;
+ ? GETLINE_CONCAT_CONTBAR : GETLINE_CONCAT_CONT;
for (;;)
{
if (KeyTyped)
@@ -3368,7 +3368,7 @@
VIM_CLEAR(skip_until);
VIM_CLEAR(heredoc_trimmed);
getline_options = eap->cmdidx == CMD_def
- ? GETLINE_CONCAT_CONTDEF : GETLINE_CONCAT_CONT;
+ ? GETLINE_CONCAT_CONTBAR : GETLINE_CONCAT_CONT;
is_heredoc = FALSE;
}
}