summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-02-11 00:00:28 +0000
committerKarl Heuer <kwzh@gnu.org>1994-02-11 00:00:28 +0000
commitafdb2485967733eeea4806f8cb580f7aef8411ca (patch)
treed717000c23bc4384861c2e52bee5165e6488b02b /src/window.c
parentef0fdbb1db612088a8a5287f1fdb00dd95ba74b1 (diff)
(Fpos_visible_in_window_p): Take hscroll into account.
Diffstat (limited to 'src/window.c')
-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.")
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;
}