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 61d9217..ce6abaf 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -9498,7 +9498,11 @@
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;