]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Correct printf parameter mismatch in wxWndProc.
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index be2bc269ee5185a1612451b0463ad9835fea250b..0b115f6b6b582cc7be0cc2c466323c973241eb41 100644 (file)
@@ -409,6 +409,9 @@ void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
 
         dc.DestroyClippingRegion();
 
+        // Other user defined painting after everything else (i.e. all text) is painted
+        PaintAboveContent(dc);
+
 #if wxRICHTEXT_USE_OWN_CARET
         if (GetCaret()->IsVisible())
         {
@@ -2600,7 +2603,7 @@ void wxRichTextCtrl::SetSelection(long from, long to)
         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();