--- src/fr-window.c.orig 2008-10-21 01:06:33.000000000 +0200 +++ src/fr-window.c 2009-04-03 01:05:04.000000000 +0200 @@ -820,14 +820,11 @@ if (strcmp (window->priv->history_current->data, path) == 0) return; - /* Add locations visited using the back button to the history - * list. */ - if (window->priv->history != window->priv->history_current) { - GList *scan = window->priv->history->next; - while (scan != window->priv->history_current->next) { - window->priv->history = g_list_prepend (window->priv->history, g_strdup (scan->data)); - scan = scan->next; - } + /* Remove any forward history when adding a new item to the list. */ + while (window->priv->history != window->priv->history_current) { + gpointer data = window->priv->history->data; + window->priv->history = g_list_delete_link(window->priv->history, window->priv->history); + g_free(data); } }