Commit 66d41723 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(coordinates_in_window): Fix x position for ON_RIGHT_MARGIN.

Fix x position for ON_TEXT when left margin width > 0.
parent d76432f5
...@@ -742,9 +742,9 @@ coordinates_in_window (w, x, y) ...@@ -742,9 +742,9 @@ coordinates_in_window (w, x, y)
? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w)) ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
: (*x >= right_x - rmargin_width))) : (*x >= right_x - rmargin_width)))
{ {
*x -= right_x; *x -= right_x - rmargin_width;
if (!WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)) if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
*x -= WINDOW_RIGHT_FRINGE_WIDTH (w); *x += WINDOW_RIGHT_FRINGE_WIDTH (w);
*y -= top_y; *y -= top_y;
return ON_RIGHT_MARGIN; return ON_RIGHT_MARGIN;
} }
...@@ -756,7 +756,7 @@ coordinates_in_window (w, x, y) ...@@ -756,7 +756,7 @@ coordinates_in_window (w, x, y)
} }
/* Everything special ruled out - must be on text area */ /* Everything special ruled out - must be on text area */
*x -= left_x + WINDOW_LEFT_FRINGE_WIDTH (w); *x -= text_left;
*y -= top_y; *y -= top_y;
return ON_TEXT; return ON_TEXT;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment