]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for caret positioning bug when selecting content
authorJulian Smart <julian@anthemion.co.uk>
Fri, 13 Jul 2012 18:11:24 +0000 (18:11 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 13 Jul 2012 18:11:24 +0000 (18:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 721db6b872f49ecaa09fa233c0d71af0c3abf68f..7a92cc4399020ec7b4ce58b6c2a0bda708e5f892 100644 (file)
@@ -1992,7 +1992,7 @@ bool wxRichTextCtrl::MoveRight(int noPositions, int flags)
         // we want to adjust the caret position such that it is positioned at the
         // start of the next line, rather than jumping past the first character of the
         // line.
-        if (noPositions == 1 && !extendSel)
+        if (noPositions == 1)
             MoveCaretForward(oldPos);
         else
             SetCaretPosition(newPos);
@@ -2019,7 +2019,7 @@ bool wxRichTextCtrl::MoveLeft(int noPositions, int flags)
         if (!extendSel)
             SelectNone();
 
-        if (noPositions == 1 && !extendSel)
+        if (noPositions == 1)
             MoveCaretBack(oldPos);
         else
             SetCaretPosition(newPos);