emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103889: Fix bug #8468 with redisplay


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103889: Fix bug #8468 with redisplay and scroll-margin > 0.
Date: Mon, 11 Apr 2011 19:39:09 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 103889 [merge]
fixes bug(s): http://debbugs.gnu.org/8468
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2011-04-11 19:39:09 +0300
message:
  Fix bug #8468 with redisplay and scroll-margin > 0.
  
   src/xdisp.c (redisplay_window): Don't try to determine the character
   position of the scroll margin if the window start point w->startp
   is outside the buffer's accessible region.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-04-10 20:43:08 +0000
+++ b/src/ChangeLog     2011-04-11 16:39:09 +0000
@@ -1,3 +1,9 @@
+2011-04-11  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (redisplay_window): Don't try to determine the character
+       position of the scroll margin if the window start point w->startp
+       is outside the buffer's accessible region.  (Bug#8468)
+
 2011-04-10  Eli Zaretskii  <address@hidden>
 
        Fix write-region and its subroutines for buffers > 2GB.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-04-10 19:47:49 +0000
+++ b/src/xdisp.c       2011-04-11 16:39:09 +0000
@@ -14252,7 +14252,14 @@
 
       /* If there is a scroll margin at the top of the window, find
         its character position.  */
-      if (margin)
+      if (margin
+         /* Cannot call start_display if startp is not in the
+            accessible region of the buffer.  This can happen when we
+            have just switched to a different buffer and/or changed
+            its restriction.  In that case, startp is initialized to
+            the character position 1 (BEG) because we did not yet
+            have chance to display the buffer even once.  */
+         && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV)
        {
          struct it it1;
 


reply via email to

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