Removing a superfluous abortion variable, and placing two comments better.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
8ea830f79b
Коммит
64039e9337
@ -3,6 +3,8 @@
|
|||||||
Remove two pointless calls of get_shortcut(), and adjust the comments.
|
Remove two pointless calls of get_shortcut(), and adjust the comments.
|
||||||
* src/nano.c (do_toggle): When toggling softwrap, only the edit window
|
* src/nano.c (do_toggle): When toggling softwrap, only the edit window
|
||||||
needs to be refreshed, not the entire screen.
|
needs to be refreshed, not the entire screen.
|
||||||
|
* src/browser.c (do_browser): Remove superfluous abortion variable,
|
||||||
|
and place two comments better.
|
||||||
|
|
||||||
2014-06-22 Mark Majeres <mark@engine12.com>
|
2014-06-22 Mark Majeres <mark@engine12.com>
|
||||||
* src/text.c (do_redo): When redoing a line join at the tail
|
* src/text.c (do_redo): When redoing a line join at the tail
|
||||||
|
@ -51,8 +51,6 @@ char *do_browser(char *path, DIR *dir)
|
|||||||
char *retval = NULL;
|
char *retval = NULL;
|
||||||
int kbinput;
|
int kbinput;
|
||||||
bool meta_key, func_key, old_const_update = ISSET(CONST_UPDATE);
|
bool meta_key, func_key, old_const_update = ISSET(CONST_UPDATE);
|
||||||
bool abort = FALSE;
|
|
||||||
/* Whether we should abort the file browser. */
|
|
||||||
char *prev_dir = NULL;
|
char *prev_dir = NULL;
|
||||||
/* The directory we were in, if any, before backing up via
|
/* The directory we were in, if any, before backing up via
|
||||||
* browsing to "..". */
|
* browsing to "..". */
|
||||||
@ -108,7 +106,7 @@ char *do_browser(char *path, DIR *dir)
|
|||||||
|
|
||||||
titlebar(path);
|
titlebar(path);
|
||||||
|
|
||||||
while (!abort) {
|
while (TRUE) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int i;
|
int i;
|
||||||
size_t fileline = selected / width;
|
size_t fileline = selected / width;
|
||||||
@ -321,16 +319,15 @@ char *do_browser(char *path, DIR *dir)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we've successfully opened a file, we're done, so
|
|
||||||
* get out. */
|
|
||||||
if (!S_ISDIR(st.st_mode)) {
|
if (!S_ISDIR(st.st_mode)) {
|
||||||
|
/* We've successfully opened a file, we're done, so
|
||||||
|
* get out. */
|
||||||
retval = mallocstrcpy(NULL, filelist[selected]);
|
retval = mallocstrcpy(NULL, filelist[selected]);
|
||||||
abort = TRUE;
|
break;
|
||||||
continue;
|
|
||||||
/* If we've successfully opened a directory, and it's
|
|
||||||
* "..", save the current directory in prev_dir, so that
|
|
||||||
* we can easily return to it by hitting Enter. */
|
|
||||||
} else if (strcmp(tail(filelist[selected]), "..") == 0)
|
} else if (strcmp(tail(filelist[selected]), "..") == 0)
|
||||||
|
/* We've successfully opened the parent directory,
|
||||||
|
* save the current directory in prev_dir, so that
|
||||||
|
* we can easily return to it by hitting Enter. */
|
||||||
prev_dir = mallocstrcpy(NULL, striponedir(filelist[selected]));
|
prev_dir = mallocstrcpy(NULL, striponedir(filelist[selected]));
|
||||||
|
|
||||||
dir = opendir(filelist[selected]);
|
dir = opendir(filelist[selected]);
|
||||||
@ -348,8 +345,8 @@ char *do_browser(char *path, DIR *dir)
|
|||||||
/* Start over again with the new path value. */
|
/* Start over again with the new path value. */
|
||||||
goto change_browser_directory;
|
goto change_browser_directory;
|
||||||
} else if (f->scfunc == do_exit) {
|
} else if (f->scfunc == do_exit) {
|
||||||
/* Abort the file browser. */
|
/* Exit from the file browser. */
|
||||||
abort = TRUE;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
titlebar(NULL);
|
titlebar(NULL);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user