From 66d41723c56b69b7358f22c485e079384b6fade9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Oct 2005 22:21:50 +0000 Subject: [PATCH] (coordinates_in_window): Fix x position for ON_RIGHT_MARGIN. Fix x position for ON_TEXT when left margin width > 0. --- src/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/window.c b/src/window.c index 17c8f52c286..a9e2569cbf1 100644 --- a/src/window.c +++ b/src/window.c @@ -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; } -- 2.39.5