function to empty redoqueue in history