aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2023-07-01 09:19:24 +1000
committerNeil <nyamatongwe@gmail.com>2023-07-01 09:19:24 +1000
commit75dd033787929345584b1c0949684ba59c960566 (patch)
tree59bfda824cc2d1a101de0e45537699859c43302f /src/Editor.cxx
parent8ccd7c7d40b919bc7f66c187b827d0432b4f204b (diff)
downloadscintilla-mirror-75dd033787929345584b1c0949684ba59c960566.tar.gz
Simplify sel.Range(sel.Main()) to sel.RangeMain().
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 854dc1853..80436fd21 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -910,7 +910,7 @@ SelectionPosition Editor::MovePositionSoVisible(Sci::Position pos, int moveDir)
}
Point Editor::PointMainCaret() {
- return LocationFromPosition(sel.Range(sel.Main()).caret);
+ return LocationFromPosition(sel.RangeMain().caret);
}
/**
@@ -3273,7 +3273,7 @@ void Editor::CursorUpOrDown(int direction, Selection::SelTypes selt) {
if ((selt == Selection::SelTypes::none) && sel.MoveExtends()) {
selt = !sel.IsRectangular() ? Selection::SelTypes::stream : Selection::SelTypes::rectangle;
}
- SelectionPosition caretToUse = sel.Range(sel.Main()).caret;
+ SelectionPosition caretToUse = sel.RangeMain().caret;
if (sel.IsRectangular()) {
if (selt == Selection::SelTypes::none) {
caretToUse = (direction > 0) ? sel.Limits().end : sel.Limits().start;
@@ -3297,7 +3297,7 @@ void Editor::CursorUpOrDown(int direction, Selection::SelTypes selt) {
// Calculate new caret position and call SetSelection(), which will ensure whole lines are selected.
const SelectionPosition posNew = MovePositionSoVisible(
PositionUpOrDown(caretToUse, direction, -1), direction);
- SetSelection(posNew, sel.Range(sel.Main()).anchor);
+ SetSelection(posNew, sel.RangeMain().anchor);
} else {
InvalidateWholeSelection();
if (!additionalSelectionTyping || (sel.IsRectangular())) {