From b38b020d18abd8cfda604dee2e62ba338873584b Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 19 Aug 2017 17:33:43 +0200 Subject: [PATCH] tweaks: fix compilation with --enable-{tiny,help,multibuffer} This fixes https://savannah.gnu.org/bugs/?51777. Reported-by: David Lawrence Ramsey --- src/help.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/help.c b/src/help.c index 05fdb92d..d64f86c3 100644 --- a/src/help.c +++ b/src/help.c @@ -206,13 +206,13 @@ void do_help(void) } else if (func == do_search) { do_search(); bottombars(MHELP); + } else if (func == do_research) { + do_research(); +#ifndef NANO_TINY } else if (func == do_findprevious) { do_findprevious(); - currmenu = MHELP; - } else if (func == do_findnext || func == do_research) { - do_research(); - currmenu = MHELP; -#ifndef NANO_TINY + } else if (func == do_findnext) { + do_findnext(); } else if (kbinput == KEY_WINCH) { ; /* Nothing to do. */ #endif @@ -229,11 +229,9 @@ void do_help(void) unbound_key(kbinput); /* If we searched and found something, let the cursor show it. */ - if (didfind == 1) - curs_set(1); - else - curs_set(0); + curs_set(didfind == 1 ? 1 : 0); + currmenu = MHELP; edit_refresh(); location = 0; @@ -579,9 +577,11 @@ functionptrtype parse_help_input(int *kbinput) case '/': return do_search; case 'N': +#ifndef NANO_TINY return do_findprevious; +#endif case 'n': - return do_findnext; + return do_research; case 'E': case 'e': case 'Q':