If undo or redo are used to change a buffer's content, the unsaved data indicator on the buffer's tab is shown. However, if undo or redo are pursued further, the "You are about to undo/redo past a previous save" dialog is shown and if 'yes' is selected then the unsaved data indicator is removed. If one is not keeping track of things, the contents of the buffer do not match the contents of the file and there is no indication of this.