diff options
| author | Eli Zaretskii | 2019-10-18 18:48:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-10-18 18:48:31 +0300 |
| commit | 2c9128ce1352d8098d6bbd43d081a0fb07cfff8f (patch) | |
| tree | a5721e8dabe2f284e00320ee6f6c7d450365bd16 /src | |
| parent | 5fd1c086e7c6e182893e727444faa33de1c62650 (diff) | |
| download | emacs-2c9128ce1352d8098d6bbd43d081a0fb07cfff8f.tar.gz emacs-2c9128ce1352d8098d6bbd43d081a0fb07cfff8f.zip | |
Fix mouse highlight with tab-line on TTY frames
* src/xdisp.c (note_mode_line_or_margin_highlight):
* src/dispnew.c (mode_line_string): Fix mouse highlight on TTY
frames when both header line and tab-line are displayed.
(Bug#37807)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 10 | ||||
| -rw-r--r-- | src/xdisp.c | 11 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 4cdc76f5bcf..47bf3c26cb2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5517,7 +5517,15 @@ mode_line_string (struct window *w, enum window_part part, | |||
| 5517 | else if (part == ON_TAB_LINE) | 5517 | else if (part == ON_TAB_LINE) |
| 5518 | row = MATRIX_TAB_LINE_ROW (w->current_matrix); | 5518 | row = MATRIX_TAB_LINE_ROW (w->current_matrix); |
| 5519 | else | 5519 | else |
| 5520 | row = MATRIX_HEADER_LINE_ROW (w->current_matrix); | 5520 | { |
| 5521 | row = MATRIX_HEADER_LINE_ROW (w->current_matrix); | ||
| 5522 | /* On TTY frames the matrix's tab_line_p flag is not set | ||
| 5523 | (FIXME!), so we need to adjust by hand. */ | ||
| 5524 | if (!FRAME_WINDOW_P (XFRAME (w->frame)) | ||
| 5525 | && window_wants_tab_line (w)) | ||
| 5526 | |||
| 5527 | row++; | ||
| 5528 | } | ||
| 5521 | y0 = *y - row->y; | 5529 | y0 = *y - row->y; |
| 5522 | *y = row - MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 5530 | *y = row - MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 5523 | 5531 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 30be492d9b4..457fa4343f1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -32492,6 +32492,11 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32492 | ? MATRIX_TAB_LINE_ROW (w->current_matrix) | 32492 | ? MATRIX_TAB_LINE_ROW (w->current_matrix) |
| 32493 | : MATRIX_HEADER_LINE_ROW (w->current_matrix))); | 32493 | : MATRIX_HEADER_LINE_ROW (w->current_matrix))); |
| 32494 | 32494 | ||
| 32495 | /* On TTY frames the matrix's tab_line_p flag is not set | ||
| 32496 | (FIXME!), so we need to adjust by hand. */ | ||
| 32497 | if (!FRAME_WINDOW_P (f) && area == ON_HEADER_LINE | ||
| 32498 | && window_wants_tab_line (w)) | ||
| 32499 | row++; | ||
| 32495 | /* Find the glyph under the mouse pointer. */ | 32500 | /* Find the glyph under the mouse pointer. */ |
| 32496 | if (row->mode_line_p && row->enabled_p) | 32501 | if (row->mode_line_p && row->enabled_p) |
| 32497 | { | 32502 | { |
| @@ -32706,7 +32711,11 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 32706 | ? (w->current_matrix)->nrows - 1 | 32711 | ? (w->current_matrix)->nrows - 1 |
| 32707 | : (area == ON_TAB_LINE | 32712 | : (area == ON_TAB_LINE |
| 32708 | ? 0 | 32713 | ? 0 |
| 32709 | : (w->current_matrix->tab_line_p | 32714 | : ((w->current_matrix->tab_line_p |
| 32715 | /* The window_wants_tab_line test is for TTY | ||
| 32716 | frames where the tab_line_p flag is not | ||
| 32717 | set (FIXME!). */ | ||
| 32718 | || window_wants_tab_line (w)) | ||
| 32710 | ? 1 | 32719 | ? 1 |
| 32711 | : 0))); | 32720 | : 0))); |
| 32712 | 32721 | ||