diff options
| author | Eli Zaretskii | 2000-10-12 15:40:53 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-10-12 15:40:53 +0000 |
| commit | 768324397d5899d698be9f70781a5ff880865724 (patch) | |
| tree | 1c1aa3bedaa5c5d9a4f5335154839a5f8ae45621 /src/window.c | |
| parent | a622451fdc808f526bd7b1bb49d9ca5689486b66 (diff) | |
| download | emacs-768324397d5899d698be9f70781a5ff880865724.tar.gz emacs-768324397d5899d698be9f70781a5ff880865724.zip | |
(coordinates_in_window): Fix detection of vertical line
on character terminals.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 7 |
1 files changed, 5 insertions, 2 deletions
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) | |||
| 514 | && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)) | 514 | && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)) |
| 515 | /* On the top line. */ | 515 | /* On the top line. */ |
| 516 | return 4; | 516 | return 4; |
| 517 | else if (*x < left_x || *x >= right_x) | 517 | /* Need to say "*x > right_x" rather than >=, since on character |
| 518 | terminals, the vertical line's x coordinate is right_x. */ | ||
| 519 | else if (*x < left_x || *x > right_x) | ||
| 518 | { | 520 | { |
| 519 | /* Other lines than the mode line don't include flags areas and | 521 | /* Other lines than the mode line don't include flags areas and |
| 520 | scroll bars on the left. */ | 522 | scroll bars on the left. */ |
| @@ -524,9 +526,10 @@ coordinates_in_window (w, x, y) | |||
| 524 | *y -= top_y; | 526 | *y -= top_y; |
| 525 | return *x < left_x ? 5 : 6; | 527 | return *x < left_x ? 5 : 6; |
| 526 | } | 528 | } |
| 529 | /* Here, too, "*x > right_x" is because of character terminals. */ | ||
| 527 | else if (!w->pseudo_window_p | 530 | else if (!w->pseudo_window_p |
| 528 | && !WINDOW_RIGHTMOST_P (w) | 531 | && !WINDOW_RIGHTMOST_P (w) |
| 529 | && *x >= right_x - CANON_X_UNIT (f)) | 532 | && *x > right_x - CANON_X_UNIT (f)) |
| 530 | /* On the border on the right side of the window? Assume that | 533 | /* On the border on the right side of the window? Assume that |
| 531 | this area begins at RIGHT_X minus a canonical char width. */ | 534 | this area begins at RIGHT_X minus a canonical char width. */ |
| 532 | return 3; | 535 | return 3; |