diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f5d54974b13..b64f1d35cbc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3498,18 +3498,18 @@ init_iterator (struct it *it, struct window *w, | |||
| 3498 | static int | 3498 | static int |
| 3499 | get_narrowed_width (struct window *w) | 3499 | get_narrowed_width (struct window *w) |
| 3500 | { | 3500 | { |
| 3501 | int fact; | ||
| 3502 | /* In a character-only terminal, only one font size is used, so we | 3501 | /* In a character-only terminal, only one font size is used, so we |
| 3503 | can use a smaller factor. */ | 3502 | can use a smaller factor. */ |
| 3504 | fact = EQ (Fterminal_live_p (Qnil), Qt) ? 2 : 3; | 3503 | int fact = EQ (Fterminal_live_p (Qnil), Qt) ? 2 : 3; |
| 3505 | return fact * window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS); | 3504 | int width = window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS); |
| 3505 | return fact * max (1, width); | ||
| 3506 | } | 3506 | } |
| 3507 | 3507 | ||
| 3508 | static int | 3508 | static int |
| 3509 | get_narrowed_len (struct window *w) | 3509 | get_narrowed_len (struct window *w) |
| 3510 | { | 3510 | { |
| 3511 | return get_narrowed_width (w) * | 3511 | int height = window_body_height (w, WINDOW_BODY_IN_CANONICAL_CHARS); |
| 3512 | window_body_height (w, WINDOW_BODY_IN_CANONICAL_CHARS); | 3512 | return get_narrowed_width (w) * max (1, height); |
| 3513 | } | 3513 | } |
| 3514 | 3514 | ||
| 3515 | ptrdiff_t | 3515 | ptrdiff_t |