From: David Lawrence Ramsey Date: Fri, 30 Jun 2006 21:13:55 +0000 (+0000) Subject: add miscellaneous cleanups X-Git-Tag: v1.9.99pre1~151 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a662c5579a79688927a3e6130743cfa387ba6f5a;p=nano.git add miscellaneous cleanups git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/browser.c b/src/browser.c index 7b2a3676..f3e6d1e2 100644 --- a/src/browser.c +++ b/src/browser.c @@ -48,6 +48,7 @@ static bool search_last_file = FALSE; * browsing from. */ char *do_browser(char *path, DIR *dir) { + char *retval = NULL; int kbinput; bool meta_key, func_key, old_const_update = ISSET(CONST_UPDATE); char *prev_dir = NULL; @@ -55,7 +56,6 @@ char *do_browser(char *path, DIR *dir) * entering "..". */ char *ans = mallocstrcpy(NULL, ""); /* The last answer the user typed on the statusbar. */ - char *retval = NULL; curs_set(0); blank_statusbar(); @@ -71,8 +71,6 @@ char *do_browser(char *path, DIR *dir) /* We go here after the user selects a new directory. */ kbinput = ERR; - meta_key = FALSE; - func_key = FALSE; width = 0; selected = 0; @@ -354,7 +352,7 @@ char *do_browser(char *path, DIR *dir) /* Display the file list if we don't have a key, or if we do * have a key and the selected file has changed. */ - if (kbinput == ERR || old_selected == selected) + if (kbinput == ERR || old_selected != selected) browser_refresh(); kbinput = get_kbinput(edit, &meta_key, &func_key); diff --git a/src/help.c b/src/help.c index 799e131b..daa19a59 100644 --- a/src/help.c +++ b/src/help.c @@ -36,14 +36,14 @@ static char *help_text = NULL; * the function we will call to refresh the edit window.*/ void do_help(void (*refresh_func)(void)) { + int kbinput = ERR; + bool meta_key, func_key, old_no_help = ISSET(NO_HELP); size_t line = 0; /* The line number in help_text of the first displayed help * line. This variable is zero-based. */ size_t last_line = 0; /* The line number in help_text of the last help line. This * variable is zero-based. */ - int kbinput = ERR; - bool meta_key, func_key, old_no_help = ISSET(NO_HELP); #ifndef DISABLE_MOUSE const shortcut *oldshortcut = currshortcut; /* We will set currshortcut to allow clicking on the help