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())
{
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();