Flush undo history on opening the undo history window so that it's up to date.