set maximum number of Undo