]> git.eshelyaron.com Git - emacs.git/commitdiff
(coordinates_in_window): Fix x position for ON_RIGHT_MARGIN.
authorKim F. Storm <storm@cua.dk>
Tue, 11 Oct 2005 22:21:50 +0000 (22:21 +0000)
committerKim F. Storm <storm@cua.dk>
Tue, 11 Oct 2005 22:21:50 +0000 (22:21 +0000)
Fix x position for ON_TEXT when left margin width > 0.

src/window.c

index 17c8f52c2863c56cec71971527fd437bb71c2527..a9e2569cbf140c3cfc3daa9c682e007b369dffa0 100644 (file)
@@ -742,9 +742,9 @@ coordinates_in_window (w, x, y)
              ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
              : (*x >= right_x - rmargin_width)))
        {
-         *x -= right_x;
-         if (!WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
-           *x -= WINDOW_RIGHT_FRINGE_WIDTH (w);
+         *x -= right_x - rmargin_width;
+         if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
+           *x += WINDOW_RIGHT_FRINGE_WIDTH (w);
          *y -= top_y;
          return ON_RIGHT_MARGIN;
        }
@@ -756,7 +756,7 @@ coordinates_in_window (w, x, y)
     }
 
   /* Everything special ruled out - must be on text area */
-  *x -= left_x + WINDOW_LEFT_FRINGE_WIDTH (w);
+  *x -= text_left;
   *y -= top_y;
   return ON_TEXT;
 }