commit f4e6231a850cc8e3edfb791f86ca3f8f4a9d6245 from: Mark Jamsek via: Thomas Adam date: Fri Jul 22 09:11:02 2022 UTC tog: populate new child view log lines when switching split When switching a child log view from a h- to a v-split, new log lines are empty. Rather than (mis)trace height and (not) call request_log_commits(), let resize_log_view() do the math and request commits if needed to draw new lines. ok op@ commit - 0ee22038e37ccc4b67297627b9084eac852e46c2 commit + f4e6231a850cc8e3edfb791f86ca3f8f4a9d6245 blob - 88c4ca4c8458fb49957990003adcfca10101e60a blob + e7c5ac8b61051d4bd234205678c26e66391fb3fc --- tog/tog.c +++ tog/tog.c @@ -1215,10 +1215,10 @@ switch_split(struct tog_view *view) offset_selection_up(v); offset_selection_up(v->child); } - if (v->type == TOG_VIEW_LOG && v->nscrolled) - err = request_log_commits(v); - else if (v->child->type == TOG_VIEW_LOG && v->child->nscrolled) - err = request_log_commits(v->child); + if (v->resize) + err = v->resize(v, 0); + else if (v->child->resize) + err = v->child->resize(v->child, 0); return err; }