diff options
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r-- | src/Selection.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx index 715319602..d4d4d8fe8 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -113,6 +113,7 @@ bool SelectionRange::ContainsCharacter(int posCharacter) const { bool SelectionRange::Intersect(int start, int end, SelectionPosition &selStart, SelectionPosition &selEnd) const { SelectionPosition spEnd(end, 100000); // Large amount of virtual space + SelectionPosition spStart(start); SelectionPosition first; SelectionPosition last; if (anchor > caret) { @@ -122,7 +123,7 @@ bool SelectionRange::Intersect(int start, int end, SelectionPosition &selStart, first = anchor; last = caret; } - if ((first < spEnd) && (last.Position() > start)) { + if ((first < spEnd) && (last > spStart)) { if (start > first.Position()) selStart = SelectionPosition(start); else |