commit dff918251f8c81f6d1a277cf8e9f4f348ebee837 from: Mark Jamsek date: Fri Jul 22 03:33:54 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 - f26cc5f2126442207cd94f69d093f159445e8e20 commit + dff918251f8c81f6d1a277cf8e9f4f348ebee837 blob - 4d998d35a4df6ddb4a64381049b0173d4e9f0344 blob + 491d7334d3a574341848941ad1da39adb80cd6f7 --- tog/tog.c +++ tog/tog.c @@ -1210,10 +1210,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; }