[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/long-lines-cleanup 097c5ee8f55: Two further fixes to last change
From: |
Gregory Heytings |
Subject: |
scratch/long-lines-cleanup 097c5ee8f55: Two further fixes to last changes |
Date: |
Sat, 1 Apr 2023 12:56:22 -0400 (EDT) |
branch: scratch/long-lines-cleanup
commit 097c5ee8f55580ef2f7e68a5bf91a3ccf07dbeb3
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>
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.
---
src/xdisp.c | 5 +++--
1 file 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)
{
/* In a character-only terminal, only one font size is used, so we
can use a smaller factor. */
- int fact = EQ (Fterminal_live_p (Qnil), Qt) ? 2 : 3;
+ int fact = FRAME_WINDOW_P (XFRAME (w->frame)) ? 3 : 2;
/* If the window has no fringes (in a character-only terminal or in
a GUI frame without fringes), subtract 1 from the width for the
'\' line wrapping character. */
int width = window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS)
- - (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0 ? 1 : 0);
+ - ((WINDOW_RIGHT_FRINGE_WIDTH (w) == 0
+ || WINDOW_LEFT_FRINGE_WIDTH (w) == 0) ? 1 : 0);
return fact * max (1, width);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/long-lines-cleanup 097c5ee8f55: Two further fixes to last changes,
Gregory Heytings <=