aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-08-28 02:08:48 +0000
committernyamatongwe <unknown>2009-08-28 02:08:48 +0000
commit145d0fb86d7f76a44f4ac0d6ed927b73172a5e87 (patch)
treedcdf9ea390507f69d86041e67734b41cb828e319 /win32/ScintillaWin.cxx
parent514b19dcb0fe53d453a313866395fb8d96b26956 (diff)
downloadscintilla-mirror-145d0fb86d7f76a44f4ac0d6ed927b73172a5e87.tar.gz
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.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx4
1 files changed, 3 insertions, 1 deletions
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