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