diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-10-07 21:51:04 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-10-07 21:51:04 -0700 |
commit | 3b3a40978117a79cd6960c820b12e6f04408ac25 (patch) | |
tree | 347bf4fa16579a0d78314589babd405b520f68a3 /src/nvim/ex_cmds2.c | |
parent | 7faa6c41c89f1c5d48f92a436ed690bc7ce6ea85 (diff) | |
parent | 0586a4b512b2495d32f20c46946d35a0d403bd52 (diff) | |
download | rneovim-3b3a40978117a79cd6960c820b12e6f04408ac25.tar.gz rneovim-3b3a40978117a79cd6960c820b12e6f04408ac25.tar.bz2 rneovim-3b3a40978117a79cd6960c820b12e6f04408ac25.zip |
Merge #11077 'vim-patch:8.1.{1354,1356,1362,1588}'
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 6 |
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--; |