Mercurial > vim
comparison src/edit.c @ 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 | 27be410d6d29 |
children | d564e73ff9ee |
comparison
equal
deleted
inserted
replaced
10679:016727751b95 | 10680:75c324ab1270 |
---|---|
9496 break; | 9496 break; |
9497 | 9497 |
9498 case PASTE_INSERT: | 9498 case PASTE_INSERT: |
9499 if (stop_arrow() == OK) | 9499 if (stop_arrow() == OK) |
9500 { | 9500 { |
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); | |
9502 AppendToRedobuffLit(buf, idx); | 9506 AppendToRedobuffLit(buf, idx); |
9503 } | 9507 } |
9504 break; | 9508 break; |
9505 | 9509 |
9506 case PASTE_ONE_CHAR: | 9510 case PASTE_ONE_CHAR: |