help: do not leave the cursor on the status bar after a search
(This effectively reverts commitmasterba47abb4
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 commitba47abb4
from two days ago.
parent
82080b044b
commit
73cd96838e
10
src/help.c
10
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);
|
||||
|
|
Loading…
Reference in New Issue