0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2017-01-24 17:50:52 +01:00
parent 24a2d416ec
commit 915350edec
2 changed files with 7 additions and 1 deletions

View File

@@ -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;