[PATCH 2/5] riched20: Send EN_UPDATE from text services.

Huw Davies huw at codeweavers.com
Wed Mar 24 04:08:30 CDT 2021


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 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 */
-- 
2.23.0




More information about the wine-devel mailing list