commit 065672bf12e403f981aad87eee5535a85bede9af parent 477f63d8b5084acb5be0636738dfe524e82db8f7 Author: Benno Schulenberg <bensberg@telfort.nl> Date: Wed, 24 Oct 2018 17:20:30 +0200 tweaks: condense another bit of code Diffstat:
M | src/help.c | | | 23 | ++++++----------------- |
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/src/help.c b/src/help.c @@ -199,24 +199,13 @@ void do_help(void) if (openfile->edittop->lineno + editwinrows - 1 < openfile->filebot->lineno) do_scroll_down(); - } else if (func == do_page_up) { - do_page_up(); - } else if (func == do_page_down) { - do_page_down(); - } else if (func == to_first_line) { - to_first_line(); - } else if (func == to_last_line) { - to_last_line(); - } else if (func == do_search_forward) { - do_search_forward(); - bottombars(MHELP); - } else if (func == do_search_backward) { - do_search_backward(); + } else if (func == do_page_up || func == do_page_down || + func == to_first_line || func == to_last_line || + func == do_findprevious || func == do_findnext) { + func(); + } else if (func == do_search_forward || func == do_search_backward) { + func(); bottombars(MHELP); - } else if (func == do_findprevious) { - do_findprevious(); - } else if (func == do_findnext) { - do_findnext(); #ifdef ENABLE_NANORC } else if (func == (functionptrtype)implant) { implant(first_sc_for(MHELP, func)->expansion);