Mercurial > vim
comparison src/ex_getln.c @ 17178:40c4cb095d53 v8.1.1588
patch 8.1.1588: in :let-heredoc line continuation is recognized
commit https://github.com/vim/vim/commit/e96a2498f9a2d3e93ac07431f6d4afd77f30afdf
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 25 04:12:16 2019 +0200
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 https://github.com/vim/vim/issues/4580)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 25 Jun 2019 04:15:08 +0200 |
parents | da2bb80cd838 |
children | a9556c0ba457 |
comparison
equal
deleted
inserted
replaced
17177:b58feb1a84f0 | 17178:40c4cb095d53 |
---|---|
836 */ | 836 */ |
837 char_u * | 837 char_u * |
838 getcmdline( | 838 getcmdline( |
839 int firstc, | 839 int firstc, |
840 long count, // only used for incremental search | 840 long count, // only used for incremental search |
841 int indent) // indent for inside conditionals | 841 int indent, // indent for inside conditionals |
842 int do_concat UNUSED) | |
842 { | 843 { |
843 return getcmdline_int(firstc, count, indent, TRUE); | 844 return getcmdline_int(firstc, count, indent, TRUE); |
844 } | 845 } |
845 | 846 |
846 static char_u * | 847 static char_u * |
2685 */ | 2686 */ |
2686 char_u * | 2687 char_u * |
2687 getexline( | 2688 getexline( |
2688 int c, /* normally ':', NUL for ":append" */ | 2689 int c, /* normally ':', NUL for ":append" */ |
2689 void *cookie UNUSED, | 2690 void *cookie UNUSED, |
2690 int indent) /* indent for inside conditionals */ | 2691 int indent, /* indent for inside conditionals */ |
2692 int do_concat) | |
2691 { | 2693 { |
2692 /* When executing a register, remove ':' that's in front of each line. */ | 2694 /* When executing a register, remove ':' that's in front of each line. */ |
2693 if (exec_from_reg && vpeekc() == ':') | 2695 if (exec_from_reg && vpeekc() == ':') |
2694 (void)vgetc(); | 2696 (void)vgetc(); |
2695 return getcmdline(c, 1L, indent); | 2697 return getcmdline(c, 1L, indent, do_concat); |
2696 } | 2698 } |
2697 | 2699 |
2698 /* | 2700 /* |
2699 * Get an Ex command line for Ex mode. | 2701 * Get an Ex command line for Ex mode. |
2700 * In Ex mode we only use the OS supplied line editing features and no | 2702 * In Ex mode we only use the OS supplied line editing features and no |
2704 char_u * | 2706 char_u * |
2705 getexmodeline( | 2707 getexmodeline( |
2706 int promptc, /* normally ':', NUL for ":append" and '?' for | 2708 int promptc, /* normally ':', NUL for ":append" and '?' for |
2707 :s prompt */ | 2709 :s prompt */ |
2708 void *cookie UNUSED, | 2710 void *cookie UNUSED, |
2709 int indent) /* indent for inside conditionals */ | 2711 int indent, /* indent for inside conditionals */ |
2712 int do_concat UNUSED) | |
2710 { | 2713 { |
2711 garray_T line_ga; | 2714 garray_T line_ga; |
2712 char_u *pend; | 2715 char_u *pend; |
2713 int startcol = 0; | 2716 int startcol = 0; |
2714 int c1 = 0; | 2717 int c1 = 0; |
7407 { | 7410 { |
7408 theline = eap->getline( | 7411 theline = eap->getline( |
7409 #ifdef FEAT_EVAL | 7412 #ifdef FEAT_EVAL |
7410 eap->cstack->cs_looplevel > 0 ? -1 : | 7413 eap->cstack->cs_looplevel > 0 ? -1 : |
7411 #endif | 7414 #endif |
7412 NUL, eap->cookie, 0); | 7415 NUL, eap->cookie, 0, TRUE); |
7413 | 7416 |
7414 if (theline == NULL || STRCMP(end_pattern, theline) == 0) | 7417 if (theline == NULL || STRCMP(end_pattern, theline) == 0) |
7415 { | 7418 { |
7416 vim_free(theline); | 7419 vim_free(theline); |
7417 break; | 7420 break; |