aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-06-22 13:44:46 +1000
committerNeil <nyamatongwe@gmail.com>2014-06-22 13:44:46 +1000
commit47ac30dfae520dd56e0c4cd20827d65bae25e073 (patch)
treeb032e0dc0eda28a8e64977298dcc04e884f5ce5e /src/Selection.cxx
parent93c33490b77157f2e5422f4962ac4b88f4aea7c5 (diff)
downloadscintilla-mirror-47ac30dfae520dd56e0c4cd20827d65bae25e073.tar.gz
Stop storing a pointer to the selection on LineLayout objects where it may have
a lifetime that is too long. Instead provide it as an argument to BreakFinder where it is only needed during intialisation.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r--src/Selection.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 4c2ab0508..b46dca890 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -226,10 +226,18 @@ SelectionRange &Selection::Range(size_t r) {
return ranges[r];
}
+const SelectionRange &Selection::Range(size_t r) const {
+ return ranges[r];
+}
+
SelectionRange &Selection::RangeMain() {
return ranges[mainRange];
}
+const SelectionRange &Selection::RangeMain() const {
+ return ranges[mainRange];
+}
+
SelectionPosition Selection::Start() const {
if (IsRectangular()) {
return rangeRectangular.Start();