diff options
| author | Lars Ingebrigtsen | 2020-12-30 03:34:17 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-12-30 03:34:17 +0100 |
| commit | dc308c80ee5825d237ac535247f48d0237a24dad (patch) | |
| tree | 3c1d4ec54ee4eb235849c08561c3e1685158bbfd /src | |
| parent | cfb0f1c07ca97536fdc0e472e0f14c38c982df2b (diff) | |
| download | emacs-dc308c80ee5825d237ac535247f48d0237a24dad.tar.gz emacs-dc308c80ee5825d237ac535247f48d0237a24dad.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 7ad6b1b1892..7b430041f98 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) | |||
| 25467 | { | 25467 | { |
| 25468 | Lisp_Object mode_string = Fformat_mode_line (format, Qnil, Qnil, Qnil); | 25468 | Lisp_Object mode_string = Fformat_mode_line (format, Qnil, Qnil, Qnil); |
| 25469 | if (EQ (Vmode_line_compact, Qlong) | 25469 | if (EQ (Vmode_line_compact, Qlong) |
| 25470 | && window_body_width (XWINDOW (selected_window), false) >= | 25470 | && WINDOW_TOTAL_COLS (w) >= SCHARS (mode_string)) |
| 25471 | SCHARS (mode_string)) | ||
| 25472 | { | 25471 | { |
| 25473 | /* The window is wide enough; just display the mode line we | 25472 | /* The window is wide enough; just display the mode line we |
| 25474 | just computed. */ | 25473 | just computed. */ |