riched20: Don't create undos in ME_StreamIn
Matt Finnicum
mattfinn at gmail.com
Tue Jan 23 15:30:25 CST 2007
This fixes bug 7148 - a regression caused by one of my older patches.
This restores the old code that prevented ME_StreamIn from erroneously
creating undos.
Changelog:
riched20: Don't create undos in ME_StreamIn
--Matt Finnicum
---
dlls/riched20/editor.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 561574f..0074ef3 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -597,7 +597,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
{
RTF_Info parser;
ME_Style *style;
- int from, to, to2;
+ int from, to, to2, nUndoMode;
int nEventMask = editor->nEventMask;
ME_InStream inStream;
@@ -619,6 +619,9 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_ClearTempStyle(editor);
/* FIXME restore default paragraph formatting ! */
}
+
+ nUndoMode = editor->nUndoMode;
+ editor->nUndoMode = umIgnore;
inStream.editstream = stream;
inStream.editstream->dwError = 0;
@@ -671,6 +674,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
SendMessageA(editor->hWnd, EM_SETSEL, 0, 0);
}
+ editor->nUndoMode = nUndoMode;
if (format & SFF_SELECTION)
{
/* even if we didn't add an undo, we need to commit the ones added earlier */
--
1.4.4.4
More information about the wine-patches
mailing list