]> git.eshelyaron.com Git - emacs.git/commitdiff
(buffer_posn_from_coords): Take hscroll into account.
authorKarl Heuer <kwzh@gnu.org>
Thu, 10 Feb 1994 23:59:25 +0000 (23:59 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 10 Feb 1994 23:59:25 +0000 (23:59 +0000)
src/dispnew.c

index badc2d1a82b35b4c6343820bfe27a460e26ca57f..6ca52618ce7f0044f60da63a112a86488d0fcbff 100644 (file)
@@ -1254,6 +1254,7 @@ buffer_posn_from_coords (window, col, line)
      struct window *window;
      int col, line;
 {
+  int hscroll = XINT (window->hscroll);
   int window_left = XFASTINT (window->left);
 
   /* The actual width of the window is window->width less one for the
@@ -1276,9 +1277,10 @@ buffer_posn_from_coords (window, col, line)
      sure I will keep it.  */
   posn = compute_motion (startp, 0,
                         (window == XWINDOW (minibuf_window) && startp == 1
-                         ? minibuf_prompt_width : 0),
+                         ? minibuf_prompt_width : 0)
+                        + (hscroll ? 1 - hscroll : 0),
                         ZV, line, col,
-                        window_width, XINT (window->hscroll), 0);
+                        window_width, hscroll, 0);
 
   current_buffer = old_current_buffer;