From 145d0fb86d7f76a44f4ac0d6ed927b73172a5e87 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 28 Aug 2009 02:08:48 +0000 Subject: When pasting into a rectangular selection use the start of the rectangular selection rather than the start of the main range which is often the last line. --- gtk/ScintillaGTK.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index ab9c9d58a..aec9e1b7a 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1540,7 +1540,9 @@ void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) { if (selection_data->selection != GDK_SELECTION_PRIMARY) { ClearSelection(); } - SelectionPosition selStart = SelectionStart(); + SelectionPosition selStart = sel.IsRectangular() ? + sel.Rectangular().Start() : + sel.Range(sel.Main()).Start(); if (selText.rectangular) { PasteRectangular(selStart, selText.s, selText.len); -- cgit v1.2.3