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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
small tog split view regression
To:
gameoftrees@openbsd.org
Date:
Wed, 29 Jun 2022 17:20:17 +0200

Download raw body.

Thread
commit 6131ff18e81056001a823f913094a92c10580cba introduced a regression
in tog's handling of vertical split:

commit 6131ff18e81056001a823f913094a92c10580cba
from: Mark Jamsek <mark@jamsek.dev>
date: Mon Jun 20 15:54:31 2022 UTC
 
 fix fullscreen view regression introduced in 0dbbbe90fd

The problem I observe can be reproduced as follows:

 - start tog in a large terminal
 - hit Enter to open a diff view in a vertical split screen
 - shrink your terminal to 80x24 -> diff view is now fullscreen
 - make the terminal large again

Expected result:
  vertical split showing both log/diff view is restored

Result since commit 6131ff1:
  diff view remains in fullscreen across the large terminal

The patch below prevents this problem. Is this the right fix?
Asking because the patch reverts a part of commit 6131ff1, and
I cannot tell if doing so will re-introduce a different issue.

diff /home/stsp/src/got
commit - 8c4a6db8547e314f29117f820ab5f99722b980fb
path + /home/stsp/src/got
blob - 3ec7da1db803f36693a814f77125861f3ac2095e
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -774,7 +774,7 @@ view_resize(struct tog_view *view)
 	else
 		ncols = view->ncols + (COLS - view->cols);
 
-	if (view->child && view_is_splitscreen(view->child)) {
+	if (view->child) {
 		view->child->begin_x = view_split_begin_x(view->begin_x);
 		if (view->child->begin_x == 0) {
 			ncols = COLS;