Fix undo/cut/copy/paste/redo bug with code sizing.