We need to invalidate the replaced text region before calling

EM_ScrollCaret as this may call ScrollWindow.  Previously newly added
lines were not displayed if the edit needed to scroll.
This commit is contained in:
Huw Davies 2003-11-11 00:26:53 +00:00 committed by Alexandre Julliard
parent f11b022fbb
commit 4c7b65db8c
1 changed files with 7 additions and 6 deletions

View File

@ -2981,11 +2981,6 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac
EDIT_EM_SetSel(es, s, s, FALSE);
es->flags |= EF_MODIFIED;
if (send_update) es->flags |= EF_UPDATE;
EDIT_EM_ScrollCaret(es);
/* force scroll info update */
EDIT_UpdateScrollInfo(es);
if (hrgn)
{
EDIT_UpdateTextRegion(es, hrgn, TRUE);
@ -2994,6 +2989,12 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac
else
EDIT_UpdateText(es, NULL, TRUE);
EDIT_EM_ScrollCaret(es);
/* force scroll info update */
EDIT_UpdateScrollInfo(es);
if(es->flags & EF_UPDATE)
{
es->flags &= ~EF_UPDATE;