aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-10-11 22:21:50 +0000
committerKim F. Storm2005-10-11 22:21:50 +0000
commit66d41723c56b69b7358f22c485e079384b6fade9 (patch)
tree00eb3004595273138769cc46eddc94df89018faa /src
parentd76432f581bd62ff107336cbbb57b884d0cd891c (diff)
downloademacs-66d41723c56b69b7358f22c485e079384b6fade9.tar.gz
emacs-66d41723c56b69b7358f22c485e079384b6fade9.zip
(coordinates_in_window): Fix x position for ON_RIGHT_MARGIN.
Fix x position for ON_TEXT when left margin width > 0.
Diffstat (limited to 'src')
-rw-r--r--src/window.c8
1 files 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)
742 ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w)) 742 ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
743 : (*x >= right_x - rmargin_width))) 743 : (*x >= right_x - rmargin_width)))
744 { 744 {
745 *x -= right_x; 745 *x -= right_x - rmargin_width;
746 if (!WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)) 746 if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
747 *x -= WINDOW_RIGHT_FRINGE_WIDTH (w); 747 *x += WINDOW_RIGHT_FRINGE_WIDTH (w);
748 *y -= top_y; 748 *y -= top_y;
749 return ON_RIGHT_MARGIN; 749 return ON_RIGHT_MARGIN;
750 } 750 }
@@ -756,7 +756,7 @@ coordinates_in_window (w, x, y)
756 } 756 }
757 757
758 /* Everything special ruled out - must be on text area */ 758 /* Everything special ruled out - must be on text area */
759 *x -= left_x + WINDOW_LEFT_FRINGE_WIDTH (w); 759 *x -= text_left;
760 *y -= top_y; 760 *y -= top_y;
761 return ON_TEXT; 761 return ON_TEXT;
762} 762}