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;
|
editor->nUndoMode = nUndoMode;
|
||||||
pUI = ME_AddUndoItem(editor, diUndoDeleteRun, NULL);
|
if (format & SFF_SELECTION)
|
||||||
TRACE("from %d to %d\n", from, to);
|
|
||||||
if (pUI && from < to)
|
|
||||||
{
|
{
|
||||||
pUI->nStart = from;
|
pUI = ME_AddUndoItem(editor, diUndoDeleteRun, NULL);
|
||||||
pUI->nLen = to-from;
|
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);
|
ME_ReleaseStyle(style);
|
||||||
editor->nEventMask = nEventMask;
|
editor->nEventMask = nEventMask;
|
||||||
if (editor->bRedraw)
|
if (editor->bRedraw)
|
||||||
|
|
Loading…
Reference in New Issue