From 1e03c3b80c7543fa94e9d9da55a618e848089feb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 11 Dec 2010 11:05:12 +1100 Subject: Make multiple selection multi-paste work when multi-type is off. Bug #3126221. --- gtk/ScintillaGTK.cxx | 2 +- src/Editor.cxx | 4 ++-- src/Editor.h | 2 +- win32/ScintillaWin.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 99f220d6c..873bc4c65 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1424,7 +1424,7 @@ void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) { UndoGroup ug(pdoc); if (selection_data->selection != GDK_SELECTION_PRIMARY) { - ClearSelection(); + ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH); } SelectionPosition selStart = sel.IsRectangular() ? sel.Rectangular().Start() : diff --git a/src/Editor.cxx b/src/Editor.cxx index 6cf8d7490..5ed69b36b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3912,8 +3912,8 @@ void Editor::InsertPaste(SelectionPosition selStart, const char *text, int len) } } -void Editor::ClearSelection() { - if (!sel.IsRectangular()) +void Editor::ClearSelection(bool retainMultipleSelections) { + if (!sel.IsRectangular() && !retainMultipleSelections) FilterSelections(); UndoGroup ug(pdoc); for (size_t r=0; r