summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2020-10-31 09:07:53 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2020-10-31 09:07:53 -0400
commit7103192cd2b0434c7acf712d0b7cf5a2f7b19e75 (patch)
tree14333414af14ff4035a27ec26f67ab177394ae01 /lisp
parentc3a20804a81826ec091a4a096c1987a61e412580 (diff)
downloademacs-7103192cd2b0434c7acf712d0b7cf5a2f7b19e75.tar.gz
emacs-7103192cd2b0434c7acf712d0b7cf5a2f7b19e75.tar.bz2
emacs-7103192cd2b0434c7acf712d0b7cf5a2f7b19e75.zip
* src/xdisp.c (syms_of_xdisp) <"scroll-minibuffer-conservatively">: New var
Fix bug#44070, which causes the minibuffer display to jump upon minor edit (redisplay_window): Obey it. * lisp/simple.el (end-of-buffer): Obey it. * test/src/xdisp-tests.el (xdisp-tests--in-minibuffer): New macro, extracted from `xdisp-tests--minibuffer-resizing`. (xdisp-tests--minibuffer-resizing): Use it. (xdisp-tests--minibuffer-scroll): New test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a9d79d031e8..d871be104cf 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1134,7 +1134,11 @@ is supplied, or Transient Mark mode is enabled and the mark is active."
;; If the end of the buffer is not already on the screen,
;; then scroll specially to put it near, but not at, the bottom.
(overlay-recenter (point))
- (recenter -3))))
+ ;; FIXME: Arguably if `scroll-conservatively' is set, then
+ ;; we should pass -1 to `recenter'.
+ (recenter (if (and scroll-minibuffer-conservatively
+ (window-minibuffer-p))
+ -1 -3)))))
(defcustom delete-active-region t
"Whether single-char deletion commands delete an active region.