aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.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_cmds2.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_cmds2.c')
-rw-r--r--src/nvim/ex_cmds2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index 87eae2dd4f..272c81e29b 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -3218,7 +3218,7 @@ int do_source(char_u *fname, int check_other, int is_vimrc)
cookie.conv.vc_type = CONV_NONE; // no conversion
// Read the first line so we can check for a UTF-8 BOM.
- firstline = getsourceline(0, (void *)&cookie, 0);
+ firstline = getsourceline(0, (void *)&cookie, 0, true);
if (firstline != NULL && STRLEN(firstline) >= 3 && firstline[0] == 0xef
&& firstline[1] == 0xbb && firstline[2] == 0xbf) {
// Found BOM; setup conversion, skip over BOM and recode the line.
@@ -3381,7 +3381,7 @@ void free_scriptnames(void)
///
/// @return pointer to the line in allocated memory, or NULL for end-of-file or
/// some error.
-char_u *getsourceline(int c, void *cookie, int indent)
+char_u *getsourceline(int c, void *cookie, int indent, bool do_concat)
{
struct source_cookie *sp = (struct source_cookie *)cookie;
char_u *line;
@@ -3412,7 +3412,7 @@ char_u *getsourceline(int c, void *cookie, int indent)
// Only concatenate lines starting with a \ when 'cpoptions' doesn't
// contain the 'C' flag.
- if (line != NULL && (vim_strchr(p_cpo, CPO_CONCAT) == NULL)) {
+ if (line != NULL && do_concat && (vim_strchr(p_cpo, CPO_CONCAT) == NULL)) {
// compensate for the one line read-ahead
sourcing_lnum--;