Jinoh Kang (@iamahuman) commented about dlls/riched20/tests/richole.c:
{
LONG_PTR cur_undo_limit = SendMessageA(inst->hwnd, EM_SETUNDOLIMIT, inst->undo_limit, 0);
ok(cur_undo_limit == inst->undo_limit, "Expected undo limit %Id, got %Id\n",
inst->undo_limit, cur_undo_limit);
if (count) *count = 0;
}
else
{
hr = ITextDocument_Undo(inst->doc, tomTrue, count);
todo_wine
ok(hr == S_FALSE, "Undo: %#lx\n", hr);
}
if (SUCCEEDED(hr) && inst->undo_ctl_state == undoStateDisabled)
{
inst->undo_ctl_state = undoStateActive;
inst->last_undo_status = TRUE;
This models the complex behaviour of riched20's undo/redo status return. Note that adding `inst->last_undo_status = TRUE;` makes the test fail.