help: keep the same position also after M-\ or M-/ has been used

master
Benno Schulenberg 2016-12-16 13:29:34 +01:00
parent 3d62d32cbe
commit 9de0f158e2
1 changed files with 12 additions and 15 deletions

View File

@ -175,28 +175,14 @@ void do_help(void)
display_the_help_text(FALSE);
curs_set(0);
edit_refresh();
while (TRUE) {
edit_refresh();
lastmessage = HUSH;
focusing = TRUE;
kbinput = get_kbinput(edit);
#ifndef NANO_TINY
if (kbinput == KEY_WINCH)
continue;
#endif
#ifndef DISABLE_MOUSE
if (kbinput == KEY_MOUSE) {
int mouse_x, mouse_y;
get_mouseinput(&mouse_x, &mouse_y, TRUE);
continue; /* Redraw the screen. */
}
#endif
func = parse_help_input(&kbinput);
if (func == total_refresh) {
@ -224,6 +210,15 @@ void do_help(void)
do_research();
currmenu = MHELP;
curs_set(1);
#ifndef NANO_TINY
} else if (kbinput == KEY_WINCH) {
; /* Nothing to do. */
#endif
#ifndef DISABLE_MOUSE
} else if (kbinput == KEY_MOUSE) {
int dummy_x, dummy_y;
get_mouseinput(&dummy_x, &dummy_y, TRUE);
#endif
} else if (func == do_exit) {
/* Exit from the help viewer. */
close_buffer();
@ -231,6 +226,8 @@ void do_help(void)
} else
unbound_key(kbinput);
edit_refresh();
location = 0;
line = openfile->fileage;