aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/ScintillaGTK.cxx2
-rw-r--r--src/Editor.cxx4
-rw-r--r--src/Editor.h2
-rw-r--r--win32/ScintillaWin.cxx2
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<sel.Count(); r++) {
diff --git a/src/Editor.h b/src/Editor.h
index 50948e2e3..288addee0 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -391,7 +391,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void AddChar(char ch);
virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false);
void InsertPaste(SelectionPosition selStart, const char *text, int len);
- void ClearSelection();
+ void ClearSelection(bool retainMultipleSelections=false);
void ClearAll();
void ClearDocumentStyle();
void Cut();
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 99ba47ff9..fc4b336c7 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1598,7 +1598,7 @@ void ScintillaWin::Paste() {
return;
UndoGroup ug(pdoc);
bool isLine = SelectionEmpty() && (::IsClipboardFormatAvailable(cfLineSelect) != 0);
- ClearSelection();
+ ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH);
SelectionPosition selStart = sel.IsRectangular() ?
sel.Rectangular().Start() :
sel.Range(sel.Main()).Start();