"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: small tog split view regression
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 29 Jun 2022 18:10:49 +0200

Download raw body.

Thread
On Thu, Jun 30, 2022 at 01:36:24AM +1000, Mark Jamsek wrote:
> > Yes, this is the right fix. I'd forgotten about this; op also mentioned
> > this earlier. Thanks!
> 
> Actually, no. This breaks something else:
> 
> $ tog # term wide enough to vsplit
> return # open commit
> f # fullscreen commit
> tab # should go to fullscreen log, but it splits the screen
> 
> So effectivley we can't get to a fullscreen parent view when a child
> view is opened.

This fixes it for me.

diff /home/stsp/src/got
commit - 4dd27a7290cd557f7db7d0b5d647d00157e7f82f
path + /home/stsp/src/got
blob - 090dd83287c9084d96abb2895eebbfab7816bdbc
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -775,7 +775,8 @@ view_resize(struct tog_view *view)
 		ncols = view->ncols + (COLS - view->cols);
 
 	if (view->child) {
-		view->child->begin_x = view_split_begin_x(view->begin_x);
+		if (view->child->focussed)
+			view->child->begin_x = view_split_begin_x(view->begin_x);
 		if (view->child->begin_x == 0) {
 			ncols = COLS;