diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 9cf12f1a995..3a0532a693b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -321,7 +321,9 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, int margin) | |||
| 321 | int width = w->total_cols; | 321 | int width = w->total_cols; |
| 322 | double d = max (0, margin); | 322 | double d = max (0, margin); |
| 323 | d = min (width / 2 - 1, d); | 323 | d = min (width / 2 - 1, d); |
| 324 | return (int) ((double) total_glyphs / width * d); | 324 | /* Since MARGIN is positive, we cannot possibly have less than |
| 325 | one glyph for the marginal area. */ | ||
| 326 | return max (1, (int) ((double) total_glyphs / width * d)); | ||
| 325 | } | 327 | } |
| 326 | return 0; | 328 | return 0; |
| 327 | } | 329 | } |