Skip to content

Commit 915350e

Browse files
committed
patch 8.0.0230: bracketed paste does not support line breaks
Problem: When using bracketed paste line breaks are not respected. Solution: Turn CR characters into a line break if the text is being inserted. (closes #1404)
1 parent 24a2d41 commit 915350e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/edit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9498,7 +9498,11 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
94989498
case PASTE_INSERT:
94999499
if (stop_arrow() == OK)
95009500
{
9501-
ins_char_bytes(buf, idx);
9501+
c = buf[0];
9502+
if (idx == 1 && (c == CAR || c == K_KENTER || c == NL))
9503+
ins_eol(c);
9504+
else
9505+
ins_char_bytes(buf, idx);
95029506
AppendToRedobuffLit(buf, idx);
95039507
}
95049508
break;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
230,
767769
/**/
768770
229,
769771
/**/

0 commit comments

Comments
 (0)