diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2020-06-08 15:39:17 +0200 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2020-06-08 15:39:17 +0200 |
commit | 3d32aac0f895c8605e254c8b7f246537816744f5 (patch) | |
tree | b7b3cda9fc0052e826a21460f4754e0d481b4f70 /nov.el | |
parent | 4889373f1f3cd0e7277b5c3a52ff80bdcbf86b4e (diff) |
Recenter after nov-history-back/-forward
Diffstat (limited to 'nov.el')
-rw-r--r-- | nov.el | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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" |