From 0d86b08e743d3194f5eb300db94a8dc2d86332f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 9 Nov 2015 17:37:35 +0100 Subject: 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. --- view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view.c b/view.c index f984bfb..20bc469 100644 --- 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; -- cgit v1.2.3