aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 6d706939a1..c18d687cc1 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -1561,7 +1561,7 @@ heredoc_get(exarg_T *eap, char_u *cmd)
for (;;) {
int i = 0;
- char_u *theline = eap->getline(NUL, eap->cookie, 0);
+ char_u *theline = eap->getline(NUL, eap->cookie, 0, false);
if (theline != NULL && indent_len > 0) {
// trim the indent matching the first line
if (STRNCMP(theline, *eap->cmdlinep, indent_len) == 0) {
@@ -8734,7 +8734,7 @@ typedef struct {
const listitem_T *li;
} GetListLineCookie;
-static char_u *get_list_line(int c, void *cookie, int indent)
+static char_u *get_list_line(int c, void *cookie, int indent, bool do_concat)
{
GetListLineCookie *const p = (GetListLineCookie *)cookie;
@@ -21279,6 +21279,7 @@ void ex_function(exarg_T *eap)
hashitem_T *hi;
int sourcing_lnum_off;
bool show_block = false;
+ bool do_concat = true;
/*
* ":function" without argument: list functions.
@@ -21548,9 +21549,9 @@ void ex_function(exarg_T *eap)
} else {
xfree(line_to_free);
if (eap->getline == NULL) {
- theline = getcmdline(':', 0L, indent);
+ theline = getcmdline(':', 0L, indent, do_concat);
} else {
- theline = eap->getline(':', eap->cookie, indent);
+ theline = eap->getline(':', eap->cookie, indent, do_concat);
}
line_to_free = theline;
}
@@ -21580,6 +21581,7 @@ void ex_function(exarg_T *eap)
if (STRCMP(p, skip_until) == 0) {
XFREE_CLEAR(skip_until);
XFREE_CLEAR(trimmed);
+ do_concat = true;
}
}
} else {
@@ -21699,6 +21701,7 @@ void ex_function(exarg_T *eap)
} else {
skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p));
}
+ do_concat = false;
}
}
@@ -23522,7 +23525,7 @@ char_u *get_return_cmd(void *rettv)
* Called by do_cmdline() to get the next line.
* Returns allocated string, or NULL for end of function.
*/
-char_u *get_func_line(int c, void *cookie, int indent)
+char_u *get_func_line(int c, void *cookie, int indent, bool do_concat)
{
funccall_T *fcp = (funccall_T *)cookie;
ufunc_T *fp = fcp->func;