aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-02-11 00:00:28 +0000
committerKarl Heuer1994-02-11 00:00:28 +0000
commitafdb2485967733eeea4806f8cb580f7aef8411ca (patch)
treed717000c23bc4384861c2e52bee5165e6488b02b
parentef0fdbb1db612088a8a5287f1fdb00dd95ba74b1 (diff)
downloademacs-afdb2485967733eeea4806f8cb580f7aef8411ca.tar.gz
emacs-afdb2485967733eeea4806f8cb580f7aef8411ca.zip
(Fpos_visible_in_window_p): Take hscroll into account.
-rw-r--r--src/window.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index e4ed37bbec1..21ebafd4550 100644
--- a/src/window.c
+++ b/src/window.c
@@ -185,6 +185,7 @@ POS defaults to point; WINDOW, to the selected window.")
185 register int posint; 185 register int posint;
186 register struct buffer *buf; 186 register struct buffer *buf;
187 struct position posval; 187 struct position posval;
188 int hscroll;
188 189
189 if (NILP (pos)) 190 if (NILP (pos))
190 posint = point; 191 posint = point;
@@ -196,6 +197,7 @@ POS defaults to point; WINDOW, to the selected window.")
196 197
197 w = decode_window (window); 198 w = decode_window (window);
198 top = marker_position (w->start); 199 top = marker_position (w->start);
200 hscroll = XINT (w->hscroll);
199 201
200 if (posint < top) 202 if (posint < top)
201 return Qnil; 203 return Qnil;
@@ -218,9 +220,10 @@ POS defaults to point; WINDOW, to the selected window.")
218 return Qnil; 220 return Qnil;
219 221
220 /* If that info is not correct, calculate afresh */ 222 /* If that info is not correct, calculate afresh */
221 posval = *compute_motion (top, 0, 0, posint, height, 0, 223 posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0),
224 posint, height, 0,
222 window_internal_width (w) - 1, 225 window_internal_width (w) - 1,
223 XINT (w->hscroll), 0); 226 hscroll, 0);
224 227
225 return posval.vpos < height ? Qt : Qnil; 228 return posval.vpos < height ? Qt : Qnil;
226 } 229 }