From 4e0fa60f2223937d385aacf85ce48d9c4361ea89 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 24 Mar 2021 09:08:30 +0000 Subject: [PATCH] riched20: Send EN_UPDATE from text services. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/riched20/paint.c | 5 ++++- dlls/riched20/txthost.c | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 0addf7d5656..4704f43c2c3 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -132,11 +132,14 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) editor_ensure_visible( editor, &editor->pCursors[0] ); update_caret( editor ); + + if (!editor->bEmulateVersion10 || (editor->nEventMask & ENM_UPDATE)) + ME_SendOldNotify( editor, EN_UPDATE ); + ITextHost_TxViewChange(editor->texthost, update_now); ME_SendSelChange(editor); - /* send EN_CHANGE if the event mask asks for it */ if(editor->nEventMask & ENM_CHANGE) { editor->nEventMask &= ~ENM_CHANGE; diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 9e384d0c503..1fd989d5ed4 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -1187,8 +1187,6 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, HBRUSH brush = CreateSolidBrush( ITextHost_TxGetSysColor( &host->ITextHost_iface, COLOR_WINDOW ) ); hdc = BeginPaint( editor->hWnd, &ps ); - if (!editor->bEmulateVersion10 || (editor->nEventMask & ENM_UPDATE)) - ME_SendOldNotify( editor, EN_UPDATE ); brush = SelectObject( hdc, brush ); /* Erase area outside of the formatting rectangle */