changeset 32426:e34686f28483

(coordinates_in_window): Fix detection of vertical line on character terminals.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 12 Oct 2000 15:39:07 +0000
parents 5f777a66c3c1
children c704b2d23feb
files src/window.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Thu Oct 12 13:39:32 2000 +0000
+++ b/src/window.c	Thu Oct 12 15:39:07 2000 +0000
@@ -514,7 +514,9 @@
 	   && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
     /* On the top line.  */
     return 4;
-  else if (*x < left_x || *x >= right_x)
+  /* Need to say "*x > right_x" rather than >=, since on character
+     terminals, the vertical line's x coordinate is right_x.  */
+  else if (*x < left_x || *x > right_x)
     {
       /* Other lines than the mode line don't include flags areas and
 	 scroll bars on the left.  */
@@ -524,9 +526,10 @@
       *y -= top_y;
       return *x < left_x ? 5 : 6;
     }
+  /* Here, too, "*x > right_x" is because of character terminals.  */
   else if (!w->pseudo_window_p
 	   && !WINDOW_RIGHTMOST_P (w)
-	   && *x >= right_x - CANON_X_UNIT (f))
+	   && *x > right_x - CANON_X_UNIT (f))
     /* On the border on the right side of the window?  Assume that
        this area begins at RIGHT_X minus a canonical char width.  */
     return 3;