richedit: Force window update when the word wrap option has changed.
authorEric Pouech <eric.pouech@orange.fr>
Mon, 14 Apr 2008 18:56:51 +0000 (20:56 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 14 Apr 2008 21:50:12 +0000 (23:50 +0200)
dlls/riched20/editor.c

index 39827bcfcd8f436e5406c3bca356ac52efa9d2f8..7eaf76910400c5d4fe526362101dc83f2d753afb 100644 (file)
@@ -3207,7 +3207,12 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
   case EM_SETTARGETDEVICE:
     if (wParam == 0)
     {
-      editor->bWordWrap = (lParam == 0);
+      BOOL new = (lParam == 0);
+      if (editor->bWordWrap != new)
+      {
+        editor->bWordWrap = new;
+        ME_RewrapRepaint(editor);
+      }
     }
     else FIXME("Unsupported yet non NULL device in EM_SETTARGETDEVICE\n");
     break;