comparison src/dispnew.c @ 5885:b649c51e3f6b

(buffer_posn_from_coords): Take hscroll into account.
author Karl Heuer <kwzh@gnu.org>
date Thu, 10 Feb 1994 23:59:25 +0000
parents 768c8b09591b
children f67817990735
comparison
equal deleted inserted replaced
5884:d02095ea13a5 5885:b649c51e3f6b
1252 int 1252 int
1253 buffer_posn_from_coords (window, col, line) 1253 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
1260 DISP_CONTINUE_GLYPH, and less one if it's not the rightmost 1261 DISP_CONTINUE_GLYPH, and less one if it's not the rightmost
1261 window. */ 1262 window. */
1274 (window->frame))->bufp to avoid scanning from the very top of 1275 (window->frame))->bufp to avoid scanning from the very top of
1275 the window, but it isn't maintained correctly, and I'm not even 1276 the window, but it isn't maintained correctly, and I'm not even
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
1285 /* compute_motion considers frame points past the end of a line 1287 /* compute_motion considers frame points past the end of a line
1286 to be *after* the newline, i.e. at the start of the next line. 1288 to be *after* the newline, i.e. at the start of the next line.