diff src/window.c @ 66030:999beda71a39

(coordinates_in_window): Fix x position for ON_RIGHT_MARGIN. Fix x position for ON_TEXT when left margin width > 0.
author Kim F. Storm <storm@cua.dk>
date Tue, 11 Oct 2005 22:21:50 +0000
parents 7810bc0b0259
children c5b2598edd74 08b4dd6a6e87 5e2d3828e89f
line wrap: on
line diff
--- a/src/window.c	Tue Oct 11 22:21:36 2005 +0000
+++ b/src/window.c	Tue Oct 11 22:21:50 2005 +0000
@@ -742,9 +742,9 @@
 	      ? (*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 @@
     }
 
   /* 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;
 }