]> git.mdlowis.com Git - projs/tide.git/commitdiff
jumpto now uses sync view to ensure we dont overscroll. Eventually sync_view should...
authorMichael D. Lowis <mike@mdlowis.com>
Sun, 2 Apr 2017 19:12:49 +0000 (15:12 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sun, 2 Apr 2017 19:12:49 +0000 (15:12 -0400)
lib/view.c

index b5d840b844463c0ebc243390e933aa556340b21f..ff04d6a56b76f7d2fa9684d6adf2a3da458ec42b 100644 (file)
@@ -148,8 +148,6 @@ static void sync_view(View* view, size_t csr) {
         first = scroll_up(view);
     while (csr > last && last < buf_end(&(view->buffer)))
         last = scroll_dn(view);
-    while (buf_end(&(view->buffer)) && last > buf_end(&(view->buffer)))
-        last = scroll_up(view);
     view->sync_needed = false;
     if (view->sync_center) {
         sync_center(view, csr);
@@ -604,9 +602,5 @@ void view_indent(View* view, int dir) {
 }
 
 void view_jumpto(View* view, size_t off) {
-    size_t csrx, csry;
-    if (!view->nrows) return;
-    view->rows[0]->off = off;
-    view_update(view, &csrx, &csry);
     sync_view(view, off);
 }