aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-11-09 17:37:35 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-11-09 17:37:35 +0100
commit0d86b08e743d3194f5eb300db94a8dc2d86332f8 (patch)
treec2302be960efa7d767fe1fb9108bbcece4d6173a /view.c
parent6a45bbc048ab78f021e0dffbe27bbc6ffce50e22 (diff)
downloadvis-0d86b08e743d3194f5eb300db94a8dc2d86332f8.tar.gz
vis-0d86b08e743d3194f5eb300db94a8dc2d86332f8.tar.xz
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 (limited to 'view.c')
-rw-r--r--view.c2
1 files changed, 1 insertions, 1 deletions
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;