vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 412840f05f6203d0d69ff74d954e585f31e49fd1
parent 1705e40c48da05a96e80b36ef68bf57fe2ef7b26
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 16 Mar 2017 20:47:44 +0100

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:
Mview.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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);