aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2019-09-23 21:19:26 +0200
committerJurica Bradaric <jbradaric@gmail.com>2019-10-07 14:14:13 +0200
commit0586a4b512b2495d32f20c46946d35a0d403bd52 (patch)
tree6d63e31135bb1e2221e8e528b5dac9498a48a617 /src/nvim/ex_getln.c
parentc84b39150f3f5e12e042777f61ca9adf13be09d8 (diff)
downloadrneovim-0586a4b512b2495d32f20c46946d35a0d403bd52.tar.gz
rneovim-0586a4b512b2495d32f20c46946d35a0d403bd52.tar.bz2
rneovim-0586a4b512b2495d32f20c46946d35a0d403bd52.zip
vim-patch:8.1.1588: in :let-heredoc line continuation is recognized
Problem: In :let-heredoc line continuation is recognized. Solution: Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580) https://github.com/vim/vim/commit/e96a2498f9a2d3e93ac07431f6d4afd77f30afdf
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index d0af8a0fdf..5235b9e648 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1991,7 +1991,8 @@ char_u *
getcmdline (
int firstc,
long count, // only used for incremental search
- int indent // indent for inside conditionals
+ int indent, // indent for inside conditionals
+ bool do_concat // unused
)
{
// Be prepared for situations where cmdline can be invoked recursively.
@@ -2167,17 +2168,18 @@ static void correct_screencol(int idx, int cells, int *col)
* Get an Ex command line for the ":" command.
*/
char_u *
-getexline (
- int c, /* normally ':', NUL for ":append" */
+getexline(
+ int c, // normally ':', NUL for ":append"
void *cookie,
- int indent /* indent for inside conditionals */
+ int indent, // indent for inside conditionals
+ bool do_concat
)
{
/* When executing a register, remove ':' that's in front of each line. */
if (exec_from_reg && vpeekc() == ':')
(void)vgetc();
- return getcmdline(c, 1L, indent);
+ return getcmdline(c, 1L, indent, do_concat);
}
/*
@@ -2187,11 +2189,12 @@ getexline (
* Returns a string in allocated memory or NULL.
*/
char_u *
-getexmodeline (
- int promptc, /* normally ':', NUL for ":append" and '?' for
- :s prompt */
+getexmodeline(
+ int promptc, // normally ':', NUL for ":append" and '?'
+ // for :s prompt
void *cookie,
- int indent /* indent for inside conditionals */
+ int indent, // indent for inside conditionals
+ bool do_concat
)
{
garray_T line_ga;
@@ -6308,7 +6311,7 @@ char *script_get(exarg_T *const eap, size_t *const lenp)
for (;;) {
char *const theline = (char *)eap->getline(
eap->cstack->cs_looplevel > 0 ? -1 :
- NUL, eap->cookie, 0);
+ NUL, eap->cookie, 0, true);
if (theline == NULL || strcmp(end_pattern, theline) == 0) {
xfree(theline);