[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2a3577b: A better fix for tab-line mouse highlight
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 2a3577b: A better fix for tab-line mouse highlight on TTY frames |
Date: |
Sat, 19 Oct 2019 03:43:39 -0400 (EDT) |
branch: master
commit 2a3577ba11e391838f3f5dfdf48ae5a0c16b9301
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
A better fix for tab-line mouse highlight on TTY frames
* src/dispnew.c (mode_line_string):
* src/xdisp.c (note_mode_line_or_margin_highlight): Remove
recently-added workarounds for incorrect TTY mouse highlight:
they are no longer needed.
(mark_window_display_accurate_1): Set the header_line_p and
tab_line_p flags of the window's current_matrix if the window
displays these.
(display_mode_line): Set the header_line_p and tab_line_p
flags of the window's desired_matrix if the window displays
these. (Bug#37807)
---
src/dispnew.c | 10 +---------
src/xdisp.c | 20 +++++++++-----------
2 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/src/dispnew.c b/src/dispnew.c
index 47bf3c2..4cdc76f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5517,15 +5517,7 @@ mode_line_string (struct window *w, enum window_part
part,
else if (part == ON_TAB_LINE)
row = MATRIX_TAB_LINE_ROW (w->current_matrix);
else
- {
- row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
- /* On TTY frames the matrix's tab_line_p flag is not set
- (FIXME!), so we need to adjust by hand. */
- if (!FRAME_WINDOW_P (XFRAME (w->frame))
- && window_wants_tab_line (w))
-
- row++;
- }
+ row = MATRIX_HEADER_LINE_ROW (w->current_matrix);
y0 = *y - row->y;
*y = row - MATRIX_FIRST_TEXT_ROW (w->current_matrix);
diff --git a/src/xdisp.c b/src/xdisp.c
index 0d8f9a1..8cbda08 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15988,6 +15988,8 @@ mark_window_display_accurate_1 (struct window *w, bool
accurate_p)
w->current_matrix->buffer = b;
w->current_matrix->begv = BUF_BEGV (b);
w->current_matrix->zv = BUF_ZV (b);
+ w->current_matrix->header_line_p = window_wants_header_line (w);
+ w->current_matrix->tab_line_p = window_wants_tab_line (w);
w->last_cursor_vpos = w->cursor.vpos;
w->last_cursor_off_p = w->cursor_off_p;
@@ -24947,7 +24949,12 @@ display_mode_line (struct window *w, enum face_id
face_id, Lisp_Object format)
it.glyph_row->mode_line_p = true;
if (face_id == TAB_LINE_FACE_ID)
- it.glyph_row->tab_line_p = true;
+ {
+ it.glyph_row->tab_line_p = true;
+ w->desired_matrix->tab_line_p = true;
+ }
+ else if (face_id == HEADER_LINE_FACE_ID)
+ w->desired_matrix->header_line_p = true;
/* FIXME: This should be controlled by a user option. But
supporting such an option is not trivial, since the mode line is
@@ -32488,11 +32495,6 @@ note_mode_line_or_margin_highlight (Lisp_Object
window, int x, int y,
? MATRIX_TAB_LINE_ROW (w->current_matrix)
: MATRIX_HEADER_LINE_ROW (w->current_matrix)));
- /* On TTY frames the matrix's tab_line_p flag is not set
- (FIXME!), so we need to adjust by hand. */
- if (!FRAME_WINDOW_P (f) && area == ON_HEADER_LINE
- && window_wants_tab_line (w))
- row++;
/* Find the glyph under the mouse pointer. */
if (row->mode_line_p && row->enabled_p)
{
@@ -32707,11 +32709,7 @@ note_mode_line_or_margin_highlight (Lisp_Object
window, int x, int y,
? (w->current_matrix)->nrows - 1
: (area == ON_TAB_LINE
? 0
- : ((w->current_matrix->tab_line_p
- /* The window_wants_tab_line test is for TTY
- frames where the tab_line_p flag is not
- set (FIXME!). */
- || window_wants_tab_line (w))
+ : (w->current_matrix->tab_line_p
? 1
: 0)));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2a3577b: A better fix for tab-line mouse highlight on TTY frames,
Eli Zaretskii <=