vis

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

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

commit c9beb7f594d188107ca7113658534b5a3e0ddedd
parent 15cfcbc341fea8ac5b9bb2d9f85422254bd9b87a
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon,  9 Nov 2015 17:37:35 +0100

view: improve window redrawing for shared files/split windows

When a file was being displayed in multiple windows changes in one
could confuse the other.

Diffstat:
Mview.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/view.c b/view.c @@ -125,12 +125,12 @@ void view_tabwidth_set(View *view, int tabwidth) { static void view_clear(View *view) { if (view->start != view->start_last) { view->start_mark = text_mark_set(view->text, view->start); - view->start_last = view->start; } else { size_t start = text_mark_get(view->text, view->start_mark); if (start != EPOS) view->start = start; } + view->start_last = view->start; view->topline = view->lines; view->topline->lineno = text_lineno_by_pos(view->text, view->start); view->lastline = view->topline;