From: Stefan Sperling Subject: Re: tog: expand horizontal split support to all views To: Mark Jamsek Cc: gameoftrees@openbsd.org Date: Sat, 2 Jul 2022 20:27:38 +0200 On Fri, Jul 01, 2022 at 01:10:08AM +1000, Mark Jamsek wrote: > This makes hsplits available to the remaining parent->child view > combinations: > > log -> tree > log -> ref > tree -> log > tree -> ref > ref -> tree > > Now, hsplits are available for all the same parent->child combinations > as vsplits. > > In tog, we only allow one level of child views. Views opened from child > views become a new parent view as per this excerpt (cf. tog.c:489): > > * When a new view is opened from within a parent view, this new view > * becomes a child view of the parent view, replacing any existing child. > * > * When a new view is opened from within a child view, this new view > * becomes a parent view which will obscure the views below until the > * user quits the new parent view by typing 'q'. > > As such, whether using v- or h-splits, if you run: > > $ tog > t # tree opens in split > return # blame opens in fullscreen > > However, if you then open a commit from that new blame (parent) view, it will > open in the current split mode (i.e., h- or v-split) as a child view. This is OK by me, it works fine. There is a small cosmetic issue which I expect will not take you long to figure out: Open the log view in a narrow terminal, such that some log message lines will be truncated as they do not fit into the terminal's width. While looking at the rightmost column of letters in the log view, hit Enter to open a diff in a hsplit view. In the log view, the last column of letters disappears while the hsplit diff view remains open.