aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2012-04-23 19:22:23 +0300
committerEli Zaretskii2012-04-23 19:22:23 +0300
commitf0ee99a0d4aa7aa0f20e5ec673fb1936b5174eea (patch)
tree4807e88952485f29a30084123de672519cefc785
parent775ab3953f56703789d1666bf16aa7c381edb835 (diff)
downloademacs-f0ee99a0d4aa7aa0f20e5ec673fb1936b5174eea.tar.gz
emacs-f0ee99a0d4aa7aa0f20e5ec673fb1936b5174eea.zip
Avoid assertion violation when scrolling minibuffer windows.
src/xdisp.c (pos_visible_p): If the window start position is beyond ZV, start the display from buffer beginning. Prevents assertion violation in init_iterator when the minibuffer window is scrolled via the scroll bar. src/window.c (window_scroll_pixel_based): Likewise.
-rw-r--r--src/ChangeLog9
-rw-r--r--src/window.c5
-rw-r--r--src/xdisp.c5
3 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index faa2a104337..906d17535c6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12012-04-23 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (pos_visible_p): If the window start position is beyond
4 ZV, start the display from buffer beginning. Prevents assertion
5 violation in init_iterator when the minibuffer window is scrolled
6 via the scroll bar.
7
8 * window.c (window_scroll_pixel_based): Likewise.
9
12012-04-23 Chong Yidong <cyd@gnu.org> 102012-04-23 Chong Yidong <cyd@gnu.org>
2 11
3 * keymap.c (where_is_internal): Doc fix (Bug#10872). 12 * keymap.c (where_is_internal): Doc fix (Bug#10872).
diff --git a/src/window.c b/src/window.c
index af7968f9edf..f93f58f9b72 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4221,6 +4221,11 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
4221 void *itdata = NULL; 4221 void *itdata = NULL;
4222 4222
4223 SET_TEXT_POS_FROM_MARKER (start, w->start); 4223 SET_TEXT_POS_FROM_MARKER (start, w->start);
4224 /* Scrolling a minibuffer window via scroll bar when the echo area
4225 shows long text sometimes resets the minibuffer contents behind
4226 our backs. */
4227 if (CHARPOS (start) > ZV)
4228 SET_TEXT_POS (start, BEGV, BEGV_BYTE);
4224 4229
4225 /* If PT is not visible in WINDOW, move back one half of 4230 /* If PT is not visible in WINDOW, move back one half of
4226 the screen. Allow PT to be partially visible, otherwise 4231 the screen. Allow PT to be partially visible, otherwise
diff --git a/src/xdisp.c b/src/xdisp.c
index 9881adfa34d..e53d3a57cd6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1265,6 +1265,11 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
1265 } 1265 }
1266 1266
1267 SET_TEXT_POS_FROM_MARKER (top, w->start); 1267 SET_TEXT_POS_FROM_MARKER (top, w->start);
1268 /* Scrolling a minibuffer window via scroll bar when the echo area
1269 shows long text sometimes resets the minibuffer contents behind
1270 our backs. */
1271 if (CHARPOS (top) > ZV)
1272 SET_TEXT_POS (top, BEGV, BEGV_BYTE);
1268 1273
1269 /* Compute exact mode line heights. */ 1274 /* Compute exact mode line heights. */
1270 if (WINDOW_WANTS_MODELINE_P (w)) 1275 if (WINDOW_WANTS_MODELINE_P (w))