From: Bram Moolenaar Date: Tue, 24 Jan 2017 16:50:52 +0000 (+0100) Subject: patch 8.0.0230: bracketed paste does not support line breaks X-Git-Tag: v8.0.0230 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=915350edec02f0326ecbe49f3b6cf2cbcd105f7d;p=vim 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) --- diff --git a/src/edit.c b/src/edit.c index 61d92170f..ce6abaf20 100644 --- a/src/edit.c +++ b/src/edit.c @@ -9498,7 +9498,11 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap) case PASTE_INSERT: if (stop_arrow() == OK) { - ins_char_bytes(buf, idx); + c = buf[0]; + if (idx == 1 && (c == CAR || c == K_KENTER || c == NL)) + ins_eol(c); + else + ins_char_bytes(buf, idx); AppendToRedobuffLit(buf, idx); } break; diff --git a/src/version.c b/src/version.c index 829b3b94c..c7528b7d9 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 230, /**/ 229, /**/