vis

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

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

commit 29f8ba9dd33d7d510254abffdbdea678171e880a
parent 1f5f86be2f97c010beb9bc3b87d7576138fc664f
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed,  8 Feb 2017 12:09:41 +0100

view: fix view_cursors_scroll_to to operate on current state

This should fix display issues when entering the first newline of a file.

Diffstat:
Mview.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/view.c b/view.c @@ -1191,6 +1191,7 @@ Register *view_cursors_register(Cursor *c) { void view_cursors_scroll_to(Cursor *c, size_t pos) { View *view = c->view; if (view->cursor == c) { + view_draw(view); while (pos < view->start && view_viewport_up(view, 1)); while (pos > view->end && view_viewport_down(view, 1)); }