From 3d32aac0f895c8605e254c8b7f246537816744f5 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Mon, 8 Jun 2020 15:39:17 +0200 Subject: Recenter after nov-history-back/-forward --- nov.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nov.el b/nov.el index 1f509b1..94e26c9 100644 --- a/nov.el +++ b/nov.el @@ -729,7 +729,8 @@ Saving is only done if `nov-save-place-file' is set." (nov-goto-document index) (setq nov-history (cdr nov-history)) (setq nov-history-forward history-forward) - (goto-char opoint))) + (goto-char opoint) + (recenter (1- (max 1 scroll-margin))))) (defun nov-history-forward () "Go forward in the history of visited documents." @@ -740,7 +741,8 @@ Saving is only done if `nov-save-place-file' is set." ((index opoint) (car nov-history-forward))) (nov-goto-document index) (setq nov-history-forward history-forward) - (goto-char opoint))) + (goto-char opoint) + (recenter (1- (max 1 scroll-margin))))) ;;;###autoload (define-derived-mode nov-mode special-mode "EPUB" -- cgit v1.2.3