emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/window.c,v


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/window.c,v
Date: Wed, 20 Sep 2006 09:43:25 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kim F. Storm <kfstorm>  06/09/20 09:43:25

Index: window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.561
retrieving revision 1.562
diff -u -b -r1.561 -r1.562
--- window.c    19 Sep 2006 16:32:07 -0000      1.561
+++ window.c    20 Sep 2006 09:43:25 -0000      1.562
@@ -333,6 +333,7 @@
 If a character is only partially visible, nil is returned, unless the
 optional argument PARTIALLY is non-nil.
 If POS is only out of view because of horizontal scrolling, return non-nil.
+If POS is t, it specifies the position of the last visible glyph in WINDOW.
 POS defaults to point in WINDOW; WINDOW defaults to the selected window.
 
 If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil,
@@ -340,7 +341,7 @@
 where X and Y are the pixel coordinates relative to the top left corner
 of the window.  The remaining elements are omitted if the character after
 POS is fully visible; otherwise, RTOP and RBOT are the number of pixels
-off-screen at the top and bottom of the row, ROWH is the height of the
+off-window at the top and bottom of the row, ROWH is the height of the
 display row, and VPOS is the row number (0-based) containing POS.  */)
      (pos, window, partially)
      Lisp_Object pos, window, partially;
@@ -357,7 +358,9 @@
   buf = XBUFFER (w->buffer);
   SET_TEXT_POS_FROM_MARKER (top, w->start);
 
-  if (!NILP (pos))
+  if (EQ (pos, Qt))
+    posint = -1;
+  else if (!NILP (pos))
     {
       CHECK_NUMBER_COERCE_MARKER (pos);
       posint = XINT (pos);
@@ -369,8 +372,8 @@
 
   /* If position is above window start or outside buffer boundaries,
      or if window start is out of range, position is not visible.  */
-  if (posint >= CHARPOS (top)
-      && posint <= BUF_ZV (buf)
+  if ((EQ (pos, Qt)
+       || (posint >= CHARPOS (top) && posint <= BUF_ZV (buf)))
       && CHARPOS (top) >= BUF_BEGV (buf)
       && CHARPOS (top) <= BUF_ZV (buf)
       && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos)
@@ -403,8 +406,8 @@
 Value is a list (HEIGHT VPOS YPOS OFFBOT), where HEIGHT is the height
 in pixels of the visible part of the line, VPOS and YPOS are the
 vertical position in lines and pixels of the row, relative to the top
-of the first text line, and OFFBOT is the number of off-screen pixels at
-the bottom of the text row.  If there are off-screen pixels at the top
+of the first text line, and OFFBOT is the number of off-window pixels at
+the bottom of the text row.  If there are off-window pixels at the top
 of the (first) text row, YPOS is negative.
 
 Return nil if window display is not up-to-date.  In that case, use
@@ -565,7 +568,7 @@
 Return NCOL.  NCOL should be zero or positive.
 
 Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
-window so that the location of point moves off-screen.  */)
+window so that the location of point moves off-window.  */)
      (window, ncol)
      Lisp_Object window, ncol;
 {




reply via email to

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