commit - 1bd8e3b16ccbc427fca485fda6db88babc57dc2b
commit + 2525dccb913c5e7f293cfcad103af7a761d32b34
blob - 2a08545196a8a55276ca860ed3c40e5d659d2134
blob + 41a38da73b3c99dd62ddda5ae9e19708dea2b862
--- tog/tog.c
+++ tog/tog.c
if (err)
return err;
v->child->resized_y = v->child->begin_y;
- if (y > v->child->begin_y) /* split increased */
+ if (y > v->child->begin_y && v->child->type == TOG_VIEW_LOG)
v->child->nscrolled = y - v->child->begin_y;
+ else if (y < v->child->begin_y && v->type == TOG_VIEW_LOG)
+ v->nscrolled = v->child->begin_y - y;
} else {
if (v->child->resized_x)
v->child->begin_x = v->child->resized_x;
return err;
}
- if (v->type == TOG_VIEW_LOG && v->nscrolled)
+ if (v->nscrolled)
err = request_log_commits(v);
- else if (v->child->type == TOG_VIEW_LOG && v->child->nscrolled)
+ else if (v->child->nscrolled)
err = request_log_commits(v->child);
v->resize = v->child->resize = 0;
{
struct tog_log_view_state *state = &view->state.log;
const struct got_error *err = NULL;
+
+ if (state->thread_args.log_complete)
+ return NULL;
state->thread_args.commits_needed += view->nscrolled;
err = trigger_log_thread(view, 1);
s->first_displayed_entry = pentry;
} while (++nscrolled < maxscroll);
- if (view->mode == TOG_VIEW_SPLIT_HRZN)
+ if (view->mode == TOG_VIEW_SPLIT_HRZN && !s->thread_args.log_complete)
view->nscrolled += nscrolled;
else
view->nscrolled = 0;