diff options
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r-- | src/Selection.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx index b46dca890..52ed5774e 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -81,6 +81,11 @@ int SelectionRange::Length() const { } } +void SelectionRange::MoveForInsertDelete(bool insertion, int startChange, int length) { + caret.MoveForInsertDelete(insertion, startChange, length); + anchor.MoveForInsertDelete(insertion, startChange, length); +} + bool SelectionRange::Contains(int pos) const { if (anchor > caret) return (pos >= caret.Position()) && (pos <= anchor.Position()); @@ -283,9 +288,11 @@ int Selection::Length() const { void Selection::MovePositions(bool insertion, int startChange, int length) { for (size_t i=0; i<ranges.size(); i++) { - ranges[i].caret.MoveForInsertDelete(insertion, startChange, length); - ranges[i].anchor.MoveForInsertDelete(insertion, startChange, length); + ranges[i].MoveForInsertDelete(insertion, startChange, length); } + if (selType == selRectangle) { + rangeRectangular.MoveForInsertDelete(insertion, startChange, length); + } } void Selection::TrimSelection(SelectionRange range) { |