nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 73cd96838e5ea7cb2f72d335ff31eaeb796d7764
parent 82080b044b4e0fa7cb25b2546d34171cff990439
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 13 Sep 2020 10:24:22 +0200

help: do not leave the cursor on the status bar after a search

(This effectively reverts commit ba47abb4 from two days ago, but it
groups things better.  It makes an unnecessary call to bottombars()
for M-Q and M-W, but this hardly matters: searching in a help text
does not need to be efficient.)

This fixes https://savannah.gnu.org/bugs/?59108.

Bug existed since commit ba47abb4 from two days ago.

Diffstat:
Msrc/help.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/help.c b/src/help.c @@ -435,6 +435,8 @@ void show_help(void) location = 0; didfind = 0; + bottombars(MHELP); + /* Extract the title from the head of the help text. */ length = break_line(help_text, HIGHEST_POSITIVE, TRUE); title = measured_copy(help_text, length); @@ -453,8 +455,6 @@ void show_help(void) lastmessage = VACUUM; focusing = TRUE; - bottombars(MHELP); - /* Show the cursor when we searched and found something. */ kbinput = get_kbinput(edit, didfind == 1 || ISSET(SHOW_CURSOR)); didfind = 0; @@ -479,10 +479,12 @@ void show_help(void) openfile->filebot->lineno) do_scroll_down(); } else if (func == do_page_up || func == do_page_down || - func == to_first_line || func == to_last_line || - func == do_search_forward || func == do_search_backward || + func == to_first_line || func == to_last_line) { + func(); + } else if (func == do_search_forward || func == do_search_backward || func == do_findprevious || func == do_findnext) { func(); + bottombars(MHELP); #ifdef ENABLE_NANORC } else if (func == (functionptrtype)implant) { implant(first_sc_for(MHELP, func)->expansion);