
Before adding a new entry to the history, we check that it does not match the previous entry to cut down the number of duplicate entries. Part of that condition is a check for a history length greater zero to avoid an illegal negative index, with the side effect that nothing is ever added while the history is empty. https://bugzilla.gnome.org/show_bug.cgi?id=621123