]> code.delx.au - gnu-emacs/commitdiff
(Fpos_visible_in_window_p): Take hscroll into account.
authorKarl Heuer <kwzh@gnu.org>
Fri, 11 Feb 1994 00:00:28 +0000 (00:00 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 11 Feb 1994 00:00:28 +0000 (00:00 +0000)
src/window.c

index e4ed37bbec186d9390d7c0d373df474f0612e5c1..21ebafd4550c85e7845e6565befd7c95d0130cda 100644 (file)
@@ -185,6 +185,7 @@ POS defaults to point; WINDOW, to the selected window.")
   register int posint;
   register struct buffer *buf;
   struct position posval;
+  int hscroll;
 
   if (NILP (pos))
     posint = point;
@@ -196,6 +197,7 @@ POS defaults to point; WINDOW, to the selected window.")
 
   w = decode_window (window);
   top = marker_position (w->start);
+  hscroll = XINT (w->hscroll);
 
   if (posint < top)
     return Qnil;
@@ -218,9 +220,10 @@ POS defaults to point; WINDOW, to the selected window.")
        return Qnil;
 
       /* If that info is not correct, calculate afresh */
-      posval = *compute_motion (top, 0, 0, posint, height, 0,
+      posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0),
+                               posint, height, 0,
                                window_internal_width (w) - 1,
-                               XINT (w->hscroll), 0);
+                               hscroll, 0);
 
       return posval.vpos < height ? Qt : Qnil;
     }