[2/3] richedit: Commit undo items after modifications in WM_IME_COMPOSITION.

Dylan Smith dylan.ah.smith at gmail.com
Mon May 24 00:04:53 CDT 2010


ME_InsertTextFromCursor could previously follow the ME_CommitUndo call
leaving uncommitted changes which would cause improper grouping of commits,
or an assertion failure.
---
 dlls/riched20/editor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 7764614..e93db65 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -4256,7 +4256,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
     ME_Style *style = ME_GetInsertStyle(editor, 0);
     hIMC = ITextHost_TxImmGetContext(editor->texthost);
     ME_DeleteSelection(editor);
-    ME_CommitUndo(editor);
     ME_SaveTempStyle(editor);
     if (lParam & GCS_RESULTSTR)
     {
@@ -4286,6 +4285,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
                         editor->imeStartIndex + dwBufLen/sizeof(WCHAR));
     }
     ME_ReleaseStyle(style);
+    ME_CommitUndo(editor);
     ME_UpdateRepaint(editor);
     return 0;
   }
-- 
1.7.0.4




More information about the wine-patches mailing list