history: add back accidentally deleted history functionality

Might have gotten a little overzealous when making changes for the
diff view.