Added revert buffer function (f5) with undo