toggling on/off undo-redo buttons