Limiting the selected file to the available ones in the list.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5273 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
954f98c448
Коммит
6062a040e1
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -565,6 +565,10 @@ void browser_refresh(void)
|
||||
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();
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user