]> git.saurik.com Git - wxWidgets.git/commitdiff
Caret position corrected to end of selection
authorJulian Smart <julian@anthemion.co.uk>
Sun, 30 May 2010 14:00:35 +0000 (14:00 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 30 May 2010 14:00:35 +0000 (14:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index be2bc269ee5185a1612451b0463ad9835fea250b..18d061a4c5da615d6ab8224a33e0d944f2f589a4 100644 (file)
@@ -2600,7 +2600,7 @@ void wxRichTextCtrl::SetSelection(long from, long to)
         m_selectionAnchor = from-1;
         m_selectionRange.SetRange(from, to-1);
 
         m_selectionAnchor = from-1;
         m_selectionRange.SetRange(from, to-1);
 
-        m_caretPosition = wxMax(-1, to-2);
+        m_caretPosition = wxMax(-1, to-1);
 
         RefreshForSelectionChange(oldSelection, m_selectionRange);
         PositionCaret();
 
         RefreshForSelectionChange(oldSelection, m_selectionRange);
         PositionCaret();