aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-01 10:51:55 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-01 10:51:55 +1000
commitf6ad671e48322e34cf23f75ea4abcff008a15e1a (patch)
tree00c94093fdb057662841a189463d58be2f2741c8 /gtk/ScintillaGTK.cxx
parent928306bf07dace37ace9eb053b87599ee47145e8 (diff)
downloadscintilla-mirror-f6ad671e48322e34cf23f75ea4abcff008a15e1a.tar.gz
Consolidate insertion for paste into Editor class and perform line end
conversion in Editor.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r--gtk/ScintillaGTK.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 236778d93..f13686077 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1496,7 +1496,7 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio
len--; // Forget the extra '\0'
#endif
- std::string dest = Document::TransformLineEnds(data, len, pdoc->eolMode);
+ std::string dest(data, len);
if (selectionTypeData == GDK_TARGET_STRING) {
if (IsUnicodeMode()) {
// Unknown encoding so assume in Latin1
@@ -1537,15 +1537,9 @@ void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) {
if (SelectionOfGSD(selection_data) != GDK_SELECTION_PRIMARY) {
ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH);
}
- SelectionPosition selStart = sel.IsRectangular() ?
- sel.Rectangular().Start() :
- sel.Range(sel.Main()).Start();
- if (selText.rectangular) {
- PasteRectangular(selStart, selText.Data(), selText.Length());
- } else {
- InsertPaste(selStart, selText.Data(), selText.Length());
- }
+ InsertPasteShape(selText.Data(), selText.Length(),
+ selText.rectangular ? pasteRectangular : pasteStream);
EnsureCaretVisible();
}
}