changeset 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 dce0cd9dbd1c
children e87e004dee38
files src/window.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
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;
 }