aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Saponara <as@php.net>2019-03-06 06:37:38 -0500
committerAdam Saponara <as@php.net>2019-03-06 06:37:38 -0500
commit454544588e659c6fe158e7c6853215e385133189 (patch)
treed365dbe2e4c45b9b77a15045589f5e889fcb2b93
parent3a4cbafba1dd53f944322adc3ddcc9e9fc74b1ca (diff)
downloadmle-454544588e659c6fe158e7c6853215e385133189.tar
mle-454544588e659c6fe158e7c6853215e385133189.tar.gz
prevent rect_buffer.w lt 1HEADmaster
-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);