riched20: Empty undo stack after EM_STREAMIN without SFF_SELECTION flag.
This commit is contained in:
parent
305ec4d08f
commit
9b1beea7d7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue