From 41d287b43ad851a9b788ef9ea2c18990d653aaa6 Mon Sep 17 00:00:00 2001 From: malc Date: Wed, 13 Jun 2018 04:10:30 +0300 Subject: [PATCH] 'z' https://github.com/moosotc/llpp/issues/86#event-1677582189 --- help.ml | 1 + main.ml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/help.ml b/help.ml index 165d46e..ecaa727 100644 --- a/help.ml +++ b/help.ml @@ -77,6 +77,7 @@ e - view error log /,? - enter text to search for (/ - forward, ? - backward) n - repeat last search (forward) p, N - repeat last search (backward) +z - vertically center the view on the first search result Ctrl-g - interrupt search -----Settings / Modes----- diff --git a/main.ml b/main.ml index 73bf8e8..1006cf3 100644 --- a/main.ml +++ b/main.ml @@ -3340,6 +3340,13 @@ let viewkeyboard key mask = | Ascii 'Q' -> exit 0 + | Ascii 'z' -> + begin match List.rev state.rects with + | (pageno, _, (_, y0, _, _, _, _, _, _)) :: _ -> + gotopage1 pageno (truncate y0 - state.winh/2) + | [] -> () + end + | Ascii 'W' -> if hasunsavedchanges () then save () -- 2.11.4.GIT