emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107894: Avoid assertion violation


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107894: Avoid assertion violation when scrolling minibuffer windows.
Date: Mon, 23 Apr 2012 19:22:23 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107894
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-04-23 19:22:23 +0300
message:
  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.
modified:
  src/ChangeLog
  src/window.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-04-23 03:11:28 +0000
+++ b/src/ChangeLog     2012-04-23 16:22:23 +0000
@@ -1,3 +1,12 @@
+2012-04-23  Eli Zaretskii  <address@hidden>
+
+       * 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.
+
+       * window.c (window_scroll_pixel_based): Likewise.
+
 2012-04-23  Chong Yidong  <address@hidden>
 
        * keymap.c (where_is_internal): Doc fix (Bug#10872).

=== modified file 'src/window.c'
--- a/src/window.c      2012-03-31 18:10:34 +0000
+++ b/src/window.c      2012-04-23 16:22:23 +0000
@@ -4221,6 +4221,11 @@
   void *itdata = NULL;
 
   SET_TEXT_POS_FROM_MARKER (start, w->start);
+  /* Scrolling a minibuffer window via scroll bar when the echo area
+     shows long text sometimes resets the minibuffer contents behind
+     our backs.  */
+  if (CHARPOS (start) > ZV)
+    SET_TEXT_POS (start, BEGV, BEGV_BYTE);
 
   /* If PT is not visible in WINDOW, move back one half of
      the screen.  Allow PT to be partially visible, otherwise

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-04-17 15:25:17 +0000
+++ b/src/xdisp.c       2012-04-23 16:22:23 +0000
@@ -1265,6 +1265,11 @@
     }
 
   SET_TEXT_POS_FROM_MARKER (top, w->start);
+  /* Scrolling a minibuffer window via scroll bar when the echo area
+     shows long text sometimes resets the minibuffer contents behind
+     our backs.  */
+  if (CHARPOS (top) > ZV)
+    SET_TEXT_POS (top, BEGV, BEGV_BYTE);
 
   /* Compute exact mode line heights.  */
   if (WINDOW_WANTS_MODELINE_P (w))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]