tweaks: condense another bit of code

master
Benno Schulenberg 2018-10-24 17:20:30 +02:00
parent 477f63d8b5
commit 065672bf12
1 changed files with 6 additions and 17 deletions

View File

@ -199,24 +199,13 @@ void do_help(void)
if (openfile->edittop->lineno + editwinrows - 1 < if (openfile->edittop->lineno + editwinrows - 1 <
openfile->filebot->lineno) openfile->filebot->lineno)
do_scroll_down(); do_scroll_down();
} else if (func == do_page_up) { } else if (func == do_page_up || func == do_page_down ||
do_page_up(); func == to_first_line || func == to_last_line ||
} else if (func == do_page_down) { func == do_findprevious || func == do_findnext) {
do_page_down(); func();
} else if (func == to_first_line) { } else if (func == do_search_forward || func == do_search_backward) {
to_first_line(); func();
} else if (func == to_last_line) {
to_last_line();
} else if (func == do_search_forward) {
do_search_forward();
bottombars(MHELP); bottombars(MHELP);
} else if (func == do_search_backward) {
do_search_backward();
bottombars(MHELP);
} else if (func == do_findprevious) {
do_findprevious();
} else if (func == do_findnext) {
do_findnext();
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
} else if (func == (functionptrtype)implant) { } else if (func == (functionptrtype)implant) {
implant(first_sc_for(MHELP, func)->expansion); implant(first_sc_for(MHELP, func)->expansion);