diff options
| author | Gregory Heytings | 2023-04-01 16:54:18 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2023-04-01 18:56:01 +0200 |
| commit | 097c5ee8f55580ef2f7e68a5bf91a3ccf07dbeb3 (patch) | |
| tree | 2f7657e72e2642b34306b3633eed25eec6c114b0 | |
| parent | dce08cf05ccd2551d2e304e868605102233f8c40 (diff) | |
| download | emacs-097c5ee8f55580ef2f7e68a5bf91a3ccf07dbeb3.tar.gz emacs-097c5ee8f55580ef2f7e68a5bf91a3ccf07dbeb3.zip | |
Two further fixes to last changes
* src/xdisp.c (get_narrowed_width): Use FRAME_WINDOW_P instead of
Fterminal_live_p. Also take WINDOW_LEFT_FRINGE_WIDTH into
account.
| -rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 438cbac1274..62dc3438117 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3582,12 +3582,13 @@ get_narrowed_width (struct window *w) | |||
| 3582 | { | 3582 | { |
| 3583 | /* In a character-only terminal, only one font size is used, so we | 3583 | /* In a character-only terminal, only one font size is used, so we |
| 3584 | can use a smaller factor. */ | 3584 | can use a smaller factor. */ |
| 3585 | int fact = EQ (Fterminal_live_p (Qnil), Qt) ? 2 : 3; | 3585 | int fact = FRAME_WINDOW_P (XFRAME (w->frame)) ? 3 : 2; |
| 3586 | /* If the window has no fringes (in a character-only terminal or in | 3586 | /* If the window has no fringes (in a character-only terminal or in |
| 3587 | a GUI frame without fringes), subtract 1 from the width for the | 3587 | a GUI frame without fringes), subtract 1 from the width for the |
| 3588 | '\' line wrapping character. */ | 3588 | '\' line wrapping character. */ |
| 3589 | int width = window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS) | 3589 | int width = window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS) |
| 3590 | - (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0 ? 1 : 0); | 3590 | - ((WINDOW_RIGHT_FRINGE_WIDTH (w) == 0 |
| 3591 | || WINDOW_LEFT_FRINGE_WIDTH (w) == 0) ? 1 : 0); | ||
| 3591 | return fact * max (1, width); | 3592 | return fact * max (1, width); |
| 3592 | } | 3593 | } |
| 3593 | 3594 | ||