X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80fdcdb90ef779185492dab676d461fc34933312..7aa18fc78675ced488adc9d42ad306a539334680:/src/richtext/richtextctrl.cpp diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index d66ac66938..c95805f58a 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -1221,6 +1221,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) SetDefaultStyleToCursorStyle(); ScrollIntoView(m_caretPosition, WXK_RIGHT); + cmdEvent.SetPosition(m_caretPosition); GetEventHandler()->ProcessEvent(cmdEvent); Update(); @@ -2203,6 +2204,19 @@ void wxRichTextCtrl::OnSize(wxSizeEvent& event) event.Skip(); } +// Force any pending layout due to large buffer +void wxRichTextCtrl::ForceDelayedLayout() +{ + if (m_fullLayoutRequired) + { + m_fullLayoutRequired = false; + m_fullLayoutTime = 0; + GetBuffer().Invalidate(wxRICHTEXT_ALL); + ShowPosition(m_fullLayoutSavedPosition); + Refresh(false); + Update(); + } +} /// Idle-time processing void wxRichTextCtrl::OnIdle(wxIdleEvent& event)