changeset 5886:08286e54ad0e

(Fpos_visible_in_window_p): Take hscroll into account.
author Karl Heuer <kwzh@gnu.org>
date Fri, 11 Feb 1994 00:00:28 +0000
parents b649c51e3f6b
children c4030d39f26d
files src/window.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Thu Feb 10 23:59:25 1994 +0000
+++ b/src/window.c	Fri Feb 11 00:00:28 1994 +0000
@@ -185,6 +185,7 @@
   register int posint;
   register struct buffer *buf;
   struct position posval;
+  int hscroll;
 
   if (NILP (pos))
     posint = point;
@@ -196,6 +197,7 @@
 
   w = decode_window (window);
   top = marker_position (w->start);
+  hscroll = XINT (w->hscroll);
 
   if (posint < top)
     return Qnil;
@@ -218,9 +220,10 @@
 	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;
     }