X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b30661fdd01159eceffd1a35dcc51b8a4d803854..ef787038ecc3f071169e5400cf4202ad2a7d6e5c:/src/richtext/richtextctrl.cpp diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index be2bc269ee..0b115f6b6b 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -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();