Short description of error
Undo removes material and slot at the same time and won't redo color change in edit mode.
Exact steps for others to reproduce the error
tab edit mode
add material slot
click (+ new) for a new material
change material color
Now undo, the last 3 steps will be undone at the same time, if you redo after, two will be redone at the same time and the last(color change) can't be redone .
Now try the same thing in Object mode, it works as expected.