Commit 9b1beea7 authored by Phil Krylov's avatar Phil Krylov Committed by Alexandre Julliard

riched20: Empty undo stack after EM_STREAMIN without SFF_SELECTION flag.

parent 305ec4d0
......@@ -664,14 +664,22 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
}
editor->nUndoMode = nUndoMode;
pUI = ME_AddUndoItem(editor, diUndoDeleteRun, NULL);
TRACE("from %d to %d\n", from, to);
if (pUI && from < to)
if (format & SFF_SELECTION)
{
pUI->nStart = from;
pUI->nLen = to-from;
pUI = ME_AddUndoItem(editor, diUndoDeleteRun, NULL);
TRACE("from %d to %d\n", from, to);
if (pUI && from < to)
{
pUI->nStart = from;
pUI->nLen = to-from;
}
ME_CommitUndo(editor);
}
ME_CommitUndo(editor);
else
{
ME_EmptyUndoStack(editor);
}
ME_ReleaseStyle(style);
editor->nEventMask = nEventMask;
if (editor->bRedraw)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment