From: Omar Polo Subject: tog: math fix for fullscreen log view To: gameoftrees@openbsd.org Date: Sun, 19 Jun 2022 18:29:17 +0200 thanks to Mark i discovered that it's possible to cycle fullscreen views in tog, and playing with his diff I noticed that my math was wrong. In draw_commit I assumed that if view->child is not NULL then we have to account for the vertical border. that's not true and cause tog not to use the full length drawing the commits when the log view is in fullscreen. to reproduce open a diff in split screen, then 'f' and tab. With commit message long enough (see for e.g. ja.git) you'll see that the last column is empty because we're accounting for a border that we don't draw. ok? diff d8b5af438b16bcea5568b1d4bfc127567e35e2f6 /home/op/w/got blob - b8935d8f4d93a4f03c1d8727adb23a6137741acf file + tog/tog.c --- tog/tog.c +++ tog/tog.c @@ -1542,7 +1542,7 @@ draw_commit(struct tog_view *view, struct got_commit_o if (newline) *newline = '\0'; limit = avail - col; - if (view->child && limit > 0) + if (view->child && view_is_splitscreen(view->child) && limit > 0) limit--; /* for the border */ err = format_line(&wlogmsg, &logmsg_width, &scrollx, logmsg, view->x, limit, col, 1);