The old code used EM_LINESCROLL which could scroll too far if the caret wasn't
in the first line of the control. Instead of trying to compute the correct
number of the lines to scroll, just use WM_VSCROLL with SB_BOTTOM parameter
instead.
Closes #12123.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64571
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// don't do this if we're frozen, saves some time
if ( !IsFrozen() && IsMultiLine() && GetRichVersion() > 1 )
{
- // setting the caret to the end and showing it simply doesn't work for
- // RichEdit 2.0 -- force it to still do what we want
- ::SendMessage(GetHwnd(), EM_LINESCROLL, 0, GetNumberOfLines());
+ ::SendMessage(GetHwnd(), WM_VSCROLL, SB_BOTTOM, NULL);
}
#endif // wxUSE_RICHEDIT
}