aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2020-10-31 09:07:53 -0400
committerStefan Monnier2020-10-31 09:07:53 -0400
commit7103192cd2b0434c7acf712d0b7cf5a2f7b19e75 (patch)
tree14333414af14ff4035a27ec26f67ab177394ae01 /src
parentc3a20804a81826ec091a4a096c1987a61e412580 (diff)
downloademacs-7103192cd2b0434c7acf712d0b7cf5a2f7b19e75.tar.gz
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 'src')
-rw-r--r--src/xdisp.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 0e5dffbe007..cc499f33261 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18820,6 +18820,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
18820 18820
18821 /* Try to scroll by specified few lines. */ 18821 /* Try to scroll by specified few lines. */
18822 if ((0 < scroll_conservatively 18822 if ((0 < scroll_conservatively
18823 || (scroll_minibuffer_conservatively && MINI_WINDOW_P (w))
18823 || 0 < emacs_scroll_step 18824 || 0 < emacs_scroll_step
18824 || temp_scroll_step 18825 || temp_scroll_step
18825 || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) 18826 || NUMBERP (BVAR (current_buffer, scroll_up_aggressively))
@@ -18830,7 +18831,10 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
18830 /* The function returns -1 if new fonts were loaded, 1 if 18831 /* The function returns -1 if new fonts were loaded, 1 if
18831 successful, 0 if not successful. */ 18832 successful, 0 if not successful. */
18832 int ss = try_scrolling (window, just_this_one_p, 18833 int ss = try_scrolling (window, just_this_one_p,
18833 scroll_conservatively, 18834 ((scroll_minibuffer_conservatively
18835 && MINI_WINDOW_P (w))
18836 ? SCROLL_LIMIT + 1
18837 : scroll_conservatively),
18834 emacs_scroll_step, 18838 emacs_scroll_step,
18835 temp_scroll_step, last_line_misfit); 18839 temp_scroll_step, last_line_misfit);
18836 switch (ss) 18840 switch (ss)
@@ -34538,7 +34542,14 @@ syms_of_xdisp (void)
34538 34542
34539 DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)"); 34543 DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)");
34540 34544
34541 DEFVAR_BOOL("inhibit-message", inhibit_message, 34545 DEFVAR_BOOL ("scroll-minibuffer-conservatively",
34546 scroll_minibuffer_conservatively,
34547 doc: /* Non-nil means scroll conservatively in minibuffer windows.
34548When the value is nil, scrolling in minibuffer windows obeys the
34549settings of `scroll-conservatively'. */);
34550 scroll_minibuffer_conservatively = true; /* bug#44070 */
34551
34552 DEFVAR_BOOL ("inhibit-message", inhibit_message,
34542 doc: /* Non-nil means calls to `message' are not displayed. 34553 doc: /* Non-nil means calls to `message' are not displayed.
34543They are still logged to the *Messages* buffer. 34554They are still logged to the *Messages* buffer.
34544 34555
@@ -34546,7 +34557,7 @@ Do NOT set this globally to a non-nil value, as doing that will
34546disable messages everywhere, including in I-search and other 34557disable messages everywhere, including in I-search and other
34547places where they are necessary. This variable is intended to 34558places where they are necessary. This variable is intended to
34548be let-bound around code that needs to disable messages temporarily. */); 34559be let-bound around code that needs to disable messages temporarily. */);
34549 inhibit_message = 0; 34560 inhibit_message = false;
34550 34561
34551 message_dolog_marker1 = Fmake_marker (); 34562 message_dolog_marker1 = Fmake_marker ();
34552 staticpro (&message_dolog_marker1); 34563 staticpro (&message_dolog_marker1);