Download raw body.
tog: vsplit view restored after resize of fullscreen mode
On Sat, Apr 22, 2023 at 05:40:39PM +1000, Mark Jamsek wrote: > On 23-04-21 07:45PM, Mikhail wrote: > > On Fri, Apr 21, 2023 at 09:31:36PM +1000, Mark Jamsek wrote: > > > On 23-04-21 11:00AM, Stefan Sperling wrote: > > > > On Fri, Apr 21, 2023 at 01:26:14PM +1000, Mark Jamsek wrote: > > > > > On 23-04-20 09:01PM, Mikhail wrote: > > > > > > Make xterm big enough to be able to show vertical split and do the > > > > > > following in a repo: > > > > > > > > > > > > <enter> (show any commit in vsplit) > > > > > > F > > > > > > <resize xterm> > > > > > > > > > > > > vsplit view is restored. > > > > > > > > > > > > Is it expected? > > > > > > > > > > It's arguably surprising behaviour but, yes, this is how tog has always > > > > > behaved--at least as far back as 0.60--so is expected in that sense. > > > > > > > > > > I'm not sure if it should be changed as this sort of comports with the > > > > > docs (emphasis added): > > > > > > > > > > F Toggle fullscreen mode for a split-screen view. **tog will > > > > > automatically use vertical split-screen views if the size of the > > > > > terminal window is sufficiently large.** > > > > > > > > > > And this is convenient sometimes. For example, when tog is started in > > > > > a small 80x24 term which is then increased and if viewing a diff, it > > > > > auto-splits with the log view. This is handy imo. > > > > > > > > > > That said, we could keep that aspect, but when the user explicitly > > > > > requests fullscreen mode with F, not split when resized. > > > > > > > > I would be fine with F overriding this. Pressing F again would then > > > > return to automatic mode, either fullscreen or split view depending > > > > on the current terminal size. Would that work? > > > > The docs could be of course be updated to say something more specific > > > > like "Force fullscreen mode. By default, tog will automatically use > > > > split-screen views if ..." > > > > > > Yes, this should be quite straight forward; just record when F is > > > toggled and only redraw fullscreen when we get a SIGWINCH. Please let me > > > know if the below diff produces the behaviour you describe and if so > > > I'll continue with it and update the docs too. > > > > I tested the patch and found a regression: > > > > start tog 219x80 (all sizes are approximation of course) > > <enter> > > F > > q > > resize tog 127x39 > > screen becomes mangled (https://people.freebsd.org/~misha/got1.png) > > Thanks, I see this too! We need to unset the new force_fullscreen flag > when closing a child view. Please let me know if the following diff > produces the desired behaviour without the breakage: New thing: tog at 173x59 <enter> F resize to 198x68 q new commits are not loaded and I have blank space in tog log view (https://people.freebsd.org/~misha/got2.png)
tog: vsplit view restored after resize of fullscreen mode