Mercurial > vim
changeset 10680:75c324ab1270 v8.0.0230
patch 8.0.0230: bracketed paste does not support line breaks
commit https://github.com/vim/vim/commit/915350edec02f0326ecbe49f3b6cf2cbcd105f7d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 24 17:50:52 2017 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 24 Jan 2017 18:00:06 +0100 |
parents | 016727751b95 |
children | 77215f362b10 |
files | src/edit.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/edit.c +++ b/src/edit.c @@ -9498,7 +9498,11 @@ bracketed_paste(paste_mode_T mode, int d 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;