Skip to content

Commit

Permalink
view: fix view_cursors_scroll_to to operate on current state
Browse files Browse the repository at this point in the history
This should fix display issues when entering the first newline of a file.
  • Loading branch information
martanne committed Feb 8, 2017
1 parent cff84b6 commit 18e0c03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 18e0c03

Please sign in to comment.