aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJohn Shahid2018-06-28 09:13:45 -0400
committerEli Zaretskii2018-07-01 19:05:37 +0300
commit260768a64be39aada03247d6057698df97bcb800 (patch)
treef61ec4466fc4768a2b0c610a8fc1ac931a067746 /lisp
parent7edc019651b3e16592d2d16616a7d4cecc285ae6 (diff)
downloademacs-260768a64be39aada03247d6057698df97bcb800.tar.gz
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')
-rw-r--r--lisp/window.el10
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':
8778 (min (max 0 scroll-margin) 8778 (min (max 0 scroll-margin)
8779 (truncate (/ (window-body-height) 4.0))))) 8779 (truncate (/ (window-body-height) 4.0)))))
8780 (cond ((eq recenter-last-op 'middle) 8780 (cond ((eq recenter-last-op 'middle)
8781 (recenter)) 8781 (recenter nil t))
8782 ((eq recenter-last-op 'top) 8782 ((eq recenter-last-op 'top)
8783 (recenter this-scroll-margin)) 8783 (recenter this-scroll-margin t))
8784 ((eq recenter-last-op 'bottom) 8784 ((eq recenter-last-op 'bottom)
8785 (recenter (- -1 this-scroll-margin))) 8785 (recenter (- -1 this-scroll-margin) t))
8786 ((integerp recenter-last-op) 8786 ((integerp recenter-last-op)
8787 (recenter recenter-last-op)) 8787 (recenter recenter-last-op t))
8788 ((floatp recenter-last-op) 8788 ((floatp recenter-last-op)
8789 (recenter (round (* recenter-last-op (window-height)))))))))) 8789 (recenter (round (* recenter-last-op (window-height))) t)))))))
8790 8790
8791(define-key global-map [?\C-l] 'recenter-top-bottom) 8791(define-key global-map [?\C-l] 'recenter-top-bottom)
8792 8792