aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 70f144ff7..41f274529 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3838,6 +3838,8 @@ void Editor::PasteRectangular(SelectionPosition pos, const char *ptr, int len) {
InsertSpace(sel.RangeMain().caret.Position(), sel.RangeMain().caret.VirtualSpace()));
int xInsert = XFromPosition(sel.RangeMain().caret);
bool prevCr = false;
+ while ((len > 0) && IsEOLChar(ptr[len-1]))
+ len--;
for (int i = 0; i < len; i++) {
if (IsEOLChar(ptr[i])) {
if ((ptr[i] == '\r') || (!prevCr))