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. --- win32/ScintillaWin.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 6bc39228e..1937458d4 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1362,7 +1362,9 @@ void ScintillaWin::Paste() { UndoGroup ug(pdoc); bool isLine = SelectionEmpty() && (::IsClipboardFormatAvailable(cfLineSelect) != 0); ClearSelection(); - SelectionPosition selStart = sel.Range(sel.Main()).Start(); + SelectionPosition selStart = sel.IsRectangular() ? + sel.Rectangular().Start() : + sel.Range(sel.Main()).Start(); bool isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0; // Always use CF_UNICODETEXT if available -- cgit v1.2.3