diff --git a/ChangeLog b/ChangeLog index d1d37ca05069df150c1de0a84fcfa69925cf3aa2..b6c5ee86d1aab6aa0074c18d732ba463bc4b1ec6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-07-01 Benno Schulenberg <bensberg@justemail.net> + * src/browser.c (do_browser), src/help.c (do_help): Make sure + to always set 'currmenu', so that we can rely on it. + 2014-06-30 Mark Majeres <mark@engine12.com> * src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to 'cut_till_eof', and 'do_cut_till_end' to 'do_cut_till_eof', to diff --git a/src/browser.c b/src/browser.c index 8d1d5ebad6022c336f815f10735a154165ef9e0d..703a0dc17ce463522a191d9eef2630b86dda6134 100644 --- a/src/browser.c +++ b/src/browser.c @@ -63,9 +63,7 @@ char *do_browser(char *path, DIR *dir) curs_set(0); blank_statusbar(); -#if !defined(DISABLE_HELP) || !defined(DISABLE_MOUSE) currmenu = MBROWSER; -#endif bottombars(MBROWSER); wnoutrefresh(bottomwin); @@ -211,9 +209,7 @@ char *do_browser(char *path, DIR *dir) browser_refresh, _("Go To Directory")); curs_set(0); -#if !defined(DISABLE_HELP) || !defined(DISABLE_MOUSE) currmenu = MBROWSER; -#endif bottombars(MBROWSER); /* If the directory begins with a newline (i.e. an diff --git a/src/help.c b/src/help.c index 6b5b97f36f2f882c185c55ac3d60cf81f7895fcd..828badca38559bdd683e60ea2c83ab4f8621460b 100644 --- a/src/help.c +++ b/src/help.c @@ -44,10 +44,8 @@ void do_help(void (*refresh_func)(void)) size_t last_line = 0; /* The line number in help_text of the last help line. This * variable is zero-based. */ -#ifndef DISABLE_MOUSE int oldmenu = currmenu; /* The menu we were called from. */ -#endif const char *ptr; /* The current line of the help text. */ size_t old_line = (size_t)-1; @@ -64,11 +62,9 @@ void do_help(void (*refresh_func)(void)) assert(help_text != NULL); -#ifndef DISABLE_MOUSE /* Set currmenu to allow clicking on the help screen's shortcut * list, after help_init() is called. */ currmenu = MHELP; -#endif if (ISSET(NO_HELP)) { /* Make sure that the help screen's shortcut list will actually @@ -168,9 +164,7 @@ void do_help(void (*refresh_func)(void)) } } -#ifndef DISABLE_MOUSE currmenu = oldmenu; -#endif if (old_no_help) { blank_bottombars();