From baa6e605fedb7f2394cd155caa9a9b6153169835 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 18 Sep 2016 21:34:08 +1000 Subject: Bug [#1861]. Fix caret position from left/right move with rectangular selection. --- src/Editor.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index bb608d08c..b6e57212b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3319,13 +3319,13 @@ int Editor::HorizontalMove(unsigned int iMessage) { sel.selType = Selection::selRectangle; sel.Rectangular() = SelectionRange(spCaret, rangeBase.anchor); SetRectangularRange(); + } else if (sel.IsRectangular()) { + // Not a rectangular extension so switch to stream. + const SelectionPosition selAtLimit = + (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start; + sel.selType = Selection::selStream; + sel.SetSelection(SelectionRange(selAtLimit)); } else { - if (sel.IsRectangular()) { - // Not a rectangular extension so switch to stream. - SelectionPosition selAtLimit = (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start; - sel.selType = Selection::selStream; - sel.SetSelection(SelectionRange(selAtLimit)); - } if (!additionalSelectionTyping) { InvalidateWholeSelection(); sel.DropAdditionalRanges(); -- cgit v1.2.3