From: Eli Zaretskii Date: Thu, 12 Oct 2000 15:40:53 +0000 (+0000) Subject: (coordinates_in_window): Fix detection of vertical line X-Git-Tag: emacs-pretest-21.0.90~931 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=768324397d5899d698be9f70781a5ff880865724;p=emacs.git (coordinates_in_window): Fix detection of vertical line on character terminals. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9346f36d630..cea1f508f20 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-10-12 Eli Zaretskii + + * window.c (coordinates_in_window): Fix detection of vertical line + on character terminals. + 2000-10-12 Gerd Moellmann * editfns.c (save_excursion_save): Additionally record the diff --git a/src/window.c b/src/window.c index 4c0c85fe827..c196937ed7b 100644 --- a/src/window.c +++ b/src/window.c @@ -514,7 +514,9 @@ coordinates_in_window (w, x, y) && *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 @@ coordinates_in_window (w, x, y) *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;