aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bview.c b/bview.c
index a9e1f33..977e475 100644
--- a/bview.c
+++ b/bview.c
@@ -111,7 +111,7 @@ int bview_resize(bview_t *self, int x, int y, int w, int h) {
self->rect_buffer.x = x + self->linenum_width + 1;
self->rect_buffer.y = y + 1;
- self->rect_buffer.w = aw - (self->linenum_width + 1 + 1);
+ self->rect_buffer.w = MLE_MAX(1, aw - (self->linenum_width + 1 + 1));
self->rect_buffer.h = ah - 1;
self->rect_margin_right.x = x + (aw - 1);