summaryrefslogtreecommitdiffstats
path: root/scintilla/src/Selection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/src/Selection.cxx')
-rw-r--r--scintilla/src/Selection.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/scintilla/src/Selection.cxx b/scintilla/src/Selection.cxx
index 498c4c0..8133537 100644
--- a/scintilla/src/Selection.cxx
+++ b/scintilla/src/Selection.cxx
@@ -7,6 +7,7 @@
#include <stdlib.h>
+#include <stdexcept>
#include <vector>
#include <algorithm>
@@ -14,6 +15,7 @@
#include "Scintilla.h"
+#include "Position.h"
#include "Selection.h"
#ifdef SCI_NAMESPACE
@@ -311,6 +313,14 @@ void Selection::TrimSelection(SelectionRange range) {
}
}
+void Selection::TrimOtherSelections(size_t r, SelectionRange range) {
+ for (size_t i = 0; i<ranges.size(); ++i) {
+ if (i != r) {
+ ranges[i].Trim(range);
+ }
+ }
+}
+
void Selection::SetSelection(SelectionRange range) {
ranges.clear();
ranges.push_back(range);