diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 6 |
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 | ||