Skip to content

Commit

Permalink
view: mark view as dirty even when resizing to same size
Browse files Browse the repository at this point in the history
This makes sure that a successive view_update call returns
true and as a result the status bar will be correctly redrawn.
  • Loading branch information
martanne committed Mar 16, 2017
1 parent ce4e53d commit 1b68cf4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1b68cf4

Please sign in to comment.