I didn’t follow the right order when I added the functions to move up and down by half a page a few years ago.
Signed-off-by: Fabienne Ducroquet <fabi...@gmail.com> --- src/config/actions-main.inc | 4 ++-- src/viewer/action.c | 16 ++++++++-------- src/viewer/text/view.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/config/actions-main.inc b/src/config/actions-main.inc index cb6c6bb..5f686b2 100644 --- a/src/config/actions-main.inc +++ b/src/config/actions-main.inc @@ -60,6 +60,8 @@ ACTION_(MAIN, "move-cursor-right", MOVE_CURSOR_RIGHT, N__("Move cursor right"), ACTION_(MAIN, "move-cursor-up", MOVE_CURSOR_UP, N__("Move cursor up"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-document-end", MOVE_DOCUMENT_END, N__("Move to the end of the document"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-document-start", MOVE_DOCUMENT_START, N__("Move to the start of the document"), ACTION_REQUIRE_VIEW_STATE), +ACTION_(MAIN, "move-half-page-down", MOVE_HALF_PAGE_DOWN, N__("Move downwards by half a page"), ACTION_REQUIRE_VIEW_STATE), +ACTION_(MAIN, "move-half-page-up", MOVE_HALF_PAGE_UP, N__("Move upwards by half a page"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-down", MOVE_LINK_DOWN, N__("Move one link down"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-down-line", MOVE_LINK_DOWN_LINE, N__("Move to the next line with a link"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-left", MOVE_LINK_LEFT, N__("Move one link left"), ACTION_REQUIRE_VIEW_STATE), @@ -71,9 +73,7 @@ ACTION_(MAIN, "move-link-right-line", MOVE_LINK_RIGHT_LINE, N__("Move one link r ACTION_(MAIN, "move-link-up", MOVE_LINK_UP, N__("Move one link up"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-link-up-line", MOVE_LINK_UP_LINE, N__("Move to the previous line with a link"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-page-down", MOVE_PAGE_DOWN, N__("Move downwards by a page"), ACTION_REQUIRE_VIEW_STATE), -ACTION_(MAIN, "move-half-page-down", MOVE_HALF_PAGE_DOWN, N__("Move downwards by half a page"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "move-page-up", MOVE_PAGE_UP, N__("Move upwards by a page"), ACTION_REQUIRE_VIEW_STATE), -ACTION_(MAIN, "move-half-page-up", MOVE_HALF_PAGE_UP, N__("Move upwards by half a page"), ACTION_REQUIRE_VIEW_STATE), ACTION_(MAIN, "open-link-in-new-tab", OPEN_LINK_IN_NEW_TAB, N__("Open the current link in a new tab"), ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK), ACTION_(MAIN, "open-link-in-new-tab-in-background", OPEN_LINK_IN_NEW_TAB_IN_BACKGROUND, N__("Open the current link in a new tab in the background"), ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK), ACTION_(MAIN, "open-link-in-new-window", OPEN_LINK_IN_NEW_WINDOW, N__("Open the current link in a new window"), ACTION_RESTRICT_ANONYMOUS | ACTION_REQUIRE_VIEW_STATE | ACTION_JUMP_TO_LINK | ACTION_REQUIRE_LINK), diff --git a/src/viewer/action.c b/src/viewer/action.c index 402c4e1..77280e6 100644 --- a/src/viewer/action.c +++ b/src/viewer/action.c @@ -355,6 +355,14 @@ do_action(struct session *ses, enum main_action action_id, int verbose) status = move_cursor_line_start(ses, doc_view); break; + case ACT_MAIN_MOVE_HALF_PAGE_DOWN: + status = move_half_page_down(ses, doc_view); + break; + + case ACT_MAIN_MOVE_HALF_PAGE_UP: + status = move_half_page_up(ses, doc_view); + break; + case ACT_MAIN_MOVE_LINK_DOWN: status = move_link_down(ses, doc_view); break; @@ -399,18 +407,10 @@ do_action(struct session *ses, enum main_action action_id, int verbose) status = move_page_down(ses, doc_view); break; - case ACT_MAIN_MOVE_HALF_PAGE_DOWN: - status = move_half_page_down(ses, doc_view); - break; - case ACT_MAIN_MOVE_PAGE_UP: status = move_page_up(ses, doc_view); break; - case ACT_MAIN_MOVE_HALF_PAGE_UP: - status = move_half_page_up(ses, doc_view); - break; - case ACT_MAIN_MOVE_DOCUMENT_START: status = move_document_start(ses, doc_view); break; diff --git a/src/viewer/text/view.h b/src/viewer/text/view.h index f7032f2..d7721b1 100644 --- a/src/viewer/text/view.h +++ b/src/viewer/text/view.h @@ -14,10 +14,10 @@ struct terminal; * But doesn't free() the @a doc_view. */ void detach_formatted(struct document_view *doc_view); -enum frame_event_status move_page_down(struct session *ses, struct document_view *doc_view); enum frame_event_status move_half_page_down(struct session *ses, struct document_view *doc_view); -enum frame_event_status move_page_up(struct session *ses, struct document_view *doc_view); enum frame_event_status move_half_page_up(struct session *ses, struct document_view *doc_view); +enum frame_event_status move_page_down(struct session *ses, struct document_view *doc_view); +enum frame_event_status move_page_up(struct session *ses, struct document_view *doc_view); enum frame_event_status move_link(struct session *ses, struct document_view *doc_view, int direction, int wraparound_bound, int wraparound_link); -- 1.8.5.1 _______________________________________________ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev