From 693551c10509eb1795929e2fd226edecd2a00173 Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 30 Oct 2012 04:32:31 +0400 Subject: [PATCH] Unify 'r' and SIGHUP behavior --- main.ml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.ml b/main.ml index 5f9e16d..7c21aad 100644 --- a/main.ml +++ b/main.ml @@ -1860,6 +1860,11 @@ let opendoc path password = wcmd "reqlayout %d %d" conf.angle (btod conf.proportional)); ;; +let reload () = + state.anchor <- getanchor (); + opendoc state.path state.password; +;; + let scalecolor c = let c = c *. conf.colorscale in (c, c, c); @@ -5196,8 +5201,7 @@ let viewkeyboard key mask = gotoghyll (getnav ~-1) | 114 -> (* r *) - state.anchor <- getanchor (); - opendoc state.path state.password + reload () | 118 when conf.debug -> (* v *) state.rects <- []; @@ -6965,8 +6969,7 @@ let () = opendoc state.path state.password; state.uioh <- uioh; - Sys.set_signal Sys.sighup - (Sys.Signal_handle (fun _ -> opendoc state.path state.password)); + Sys.set_signal Sys.sighup (Sys.Signal_handle (fun _ -> reload ())); let rec loop deadline = let r = -- 2.11.4.GIT