aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-02-10 23:59:25 +0000
committerKarl Heuer1994-02-10 23:59:25 +0000
commitef0fdbb1db612088a8a5287f1fdb00dd95ba74b1 (patch)
treeff27e2766c1e893db07b30bc58258ebede18b901 /src
parent671fbc4df13660f0b7cb366e2cbe8ee4198ebe78 (diff)
downloademacs-ef0fdbb1db612088a8a5287f1fdb00dd95ba74b1.tar.gz
emacs-ef0fdbb1db612088a8a5287f1fdb00dd95ba74b1.zip
(buffer_posn_from_coords): Take hscroll into account.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index badc2d1a82b..6ca52618ce7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1254,6 +1254,7 @@ buffer_posn_from_coords (window, col, line)
1254 struct window *window; 1254 struct window *window;
1255 int col, line; 1255 int col, line;
1256{ 1256{
1257 int hscroll = XINT (window->hscroll);
1257 int window_left = XFASTINT (window->left); 1258 int window_left = XFASTINT (window->left);
1258 1259
1259 /* The actual width of the window is window->width less one for the 1260 /* The actual width of the window is window->width less one for the
@@ -1276,9 +1277,10 @@ buffer_posn_from_coords (window, col, line)
1276 sure I will keep it. */ 1277 sure I will keep it. */
1277 posn = compute_motion (startp, 0, 1278 posn = compute_motion (startp, 0,
1278 (window == XWINDOW (minibuf_window) && startp == 1 1279 (window == XWINDOW (minibuf_window) && startp == 1
1279 ? minibuf_prompt_width : 0), 1280 ? minibuf_prompt_width : 0)
1281 + (hscroll ? 1 - hscroll : 0),
1280 ZV, line, col, 1282 ZV, line, col,
1281 window_width, XINT (window->hscroll), 0); 1283 window_width, hscroll, 0);
1282 1284
1283 current_buffer = old_current_buffer; 1285 current_buffer = old_current_buffer;
1284 1286