aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-16 20:47:44 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-03-16 20:47:44 +0100
commit1b68cf418d8a3b97a68b46faf09d3dd84e8dd3ed (patch)
tree2f8923ca598a6d7b521a6ae4dcab34c2c9c307ca /view.c
parentce4e53dfe656801a190543af0ca0a6e17c0dc0e1 (diff)
downloadvis-1b68cf418d8a3b97a68b46faf09d3dd84e8dd3ed.tar.gz
vis-1b68cf418d8a3b97a68b46faf09d3dd84e8dd3ed.tar.xz
view: mark view as dirty even when resizing to same size
This makes sure that a successive view_update call returns true and as a result the status bar will be correctly redrawn.
Diffstat (limited to 'view.c')
-rw-r--r--view.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/view.c b/view.c
index ea6b70c..1f0ebc9 100644
--- a/view.c
+++ b/view.c
@@ -456,8 +456,10 @@ bool view_resize(View *view, int width, int height) {
width = 1;
if (height <= 0)
height = 1;
- if (view->width == width && view->height == height)
+ if (view->width == width && view->height == height) {
+ view->need_update = true;
return true;
+ }
size_t lines_size = height*(sizeof(Line) + width*sizeof(Cell));
if (lines_size > view->lines_size) {
Line *lines = realloc(view->lines, lines_size);