+2015-06-28 Benno Schulenberg <bensberg@justemail.net>
+ * src/browser.c (browser_refresh): Limit the selected file to the
+ available ones in the list -- after a refresh the number may have
+ decreased. This fixes Savannah bug #45424.
+
2015-06-27 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_undo, add_undo): Skip undoing a backspace *only* when
it really tried to delete the final, magic newline.
browser_init(path_save, opendir(path_save));
qsort(filelist, filelist_len, sizeof(char *), diralphasort);
+ /* Make sure the selected file is within range. */
+ if (selected >= filelist_len)
+ selected = filelist_len - 1;
+
titlebar(path_save);
blank_edit();