[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dc308c8 1/2: Improve the `long' computation of `mode-line-compact
From: |
Lars Ingebrigtsen |
Subject: |
master dc308c8 1/2: Improve the `long' computation of `mode-line-compact' |
Date: |
Tue, 29 Dec 2020 22:48:46 -0500 (EST) |
branch: master
commit dc308c80ee5825d237ac535247f48d0237a24dad
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Improve the `long' computation of `mode-line-compact'
* src/xdisp.c (display_mode_line): Compute `long' based on total
window width, and use the passed-in window instead of the selected
window.
---
src/xdisp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 7ad6b1b..7b43004 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -25467,8 +25467,7 @@ display_mode_line (struct window *w, enum face_id
face_id, Lisp_Object format)
{
Lisp_Object mode_string = Fformat_mode_line (format, Qnil, Qnil, Qnil);
if (EQ (Vmode_line_compact, Qlong)
- && window_body_width (XWINDOW (selected_window), false) >=
- SCHARS (mode_string))
+ && WINDOW_TOTAL_COLS (w) >= SCHARS (mode_string))
{
/* The window is wide enough; just display the mode line we
just computed. */