diff options
author | nyamatongwe <devnull@localhost> | 2009-08-28 02:08:48 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-08-28 02:08:48 +0000 |
commit | 4a3755e6f1cc97f0b3cade058ed38b2f0d9c144c (patch) | |
tree | dcdf9ea390507f69d86041e67734b41cb828e319 /gtk | |
parent | 4bff1a89c2e6db853bc9fe0384031bc9e3a4bd04 (diff) | |
download | scintilla-mirror-4a3755e6f1cc97f0b3cade058ed38b2f0d9c144c.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 'gtk')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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); |