emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106022: Fix bug #4426 with buffer_po


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106022: Fix bug #4426 with buffer_posn_from_coords when header line is present.
Date: Sat, 08 Oct 2011 12:58:50 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106022
fixes bug(s): http://debbugs.gnu.org/4426
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2011-10-08 12:58:50 +0200
message:
  Fix bug #4426 with buffer_posn_from_coords when header line is present.
  
   dispnew.c (buffer_posn_from_coords): Account it.vpos for a possible
   presence of header-line.
modified:
  src/ChangeLog
  src/dispnew.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-10-07 13:08:47 +0000
+++ b/src/ChangeLog     2011-10-08 10:58:50 +0000
@@ -1,3 +1,8 @@
+2011-10-08  Eli Zaretskii  <address@hidden>
+
+       * dispnew.c (buffer_posn_from_coords): Account for a possible
+       presence of header-line.  (Bug#4426)
+
 2011-10-07  Stefan Monnier  <address@hidden>
 
        * buffer.c (syms_of_buffer) <enable-multibyte-characters>: Don't

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2011-09-24 14:38:16 +0000
+++ b/src/dispnew.c     2011-10-08 10:58:50 +0000
@@ -5261,6 +5261,10 @@
   CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
   BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
   start_display (&it, w, startp);
+  /* start_display takes into account the header-line row, but IT's
+     vpos still counts from the glyph row that includes the window's
+     start position.  Adjust for a possible header-line row.  */
+  it.vpos += WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
 
   x0 = *x;
 


reply via email to

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