diff options
author | John Shahid <jvshahid@gmail.com> | 2018-06-28 09:13:45 -0400 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-07-01 19:05:37 +0300 |
commit | 260768a64be39aada03247d6057698df97bcb800 (patch) | |
tree | f61ec4466fc4768a2b0c610a8fc1ac931a067746 /lisp/window.el | |
parent | 7edc019651b3e16592d2d16616a7d4cecc285ae6 (diff) | |
download | emacs-260768a64be39aada03247d6057698df97bcb800.tar.gz emacs-260768a64be39aada03247d6057698df97bcb800.tar.bz2 emacs-260768a64be39aada03247d6057698df97bcb800.zip |
Add a new argument to 'recenter' to allow finer control of redisplay
* window.c (recenter): Add a new REDISPLAY argument to allow the
caller to control the redisplay behavior. 'recenter' will only
redisplay the frame if this new arg and 'recenter-redisplay' are
both non-nil.
(recenter-top-bottom): Pass an extra non-nil argument to
'recenter' to force a redisplay. (Bug#31325)
Diffstat (limited to 'lisp/window.el')
-rw-r--r-- | lisp/window.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/window.el b/lisp/window.el index fdd510401da..6d9d8bdcd2e 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8778,15 +8778,15 @@ A prefix argument is handled like `recenter': (min (max 0 scroll-margin) (truncate (/ (window-body-height) 4.0))))) (cond ((eq recenter-last-op 'middle) - (recenter)) + (recenter nil t)) ((eq recenter-last-op 'top) - (recenter this-scroll-margin)) + (recenter this-scroll-margin t)) ((eq recenter-last-op 'bottom) - (recenter (- -1 this-scroll-margin))) + (recenter (- -1 this-scroll-margin) t)) ((integerp recenter-last-op) - (recenter recenter-last-op)) + (recenter recenter-last-op t)) ((floatp recenter-last-op) - (recenter (round (* recenter-last-op (window-height)))))))))) + (recenter (round (* recenter-last-op (window-height))) t))))))) (define-key global-map [?\C-l] 'recenter-top-bottom) |