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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: tog: reimplement log view reload
To:
gameoftrees@openbsd.org
Date:
Sun, 6 Dec 2020 18:14:54 +0100

Download raw body.

Thread
Stefan Sperling:

> This reimplements log view reloading (Ctrl-L), logging of a parent
> path (Backspace), and the toggle to show commits on branches (B).
> 
> The idea is to reuse the existing log view and change its state, instead
> of allocating a new view with a new state and replacing the existing view.
> 
> Fixes a segfault that occurs when a parent path is logged with Backspace:

Minor question/nit below:

> diff f039bcf33a8f964e16c59e2e66675bb6bb481658 c367f73d9195bfdbb50c5b566cea3b63f2e59f68
[...]
> +		free_commits(&s->commits);
> +		s->first_displayed_entry = NULL;
> +		s->last_displayed_entry = NULL;
> +		s->selected_entry = NULL;
> +		s->thread_args.log_complete = 0;
> +		s->quit = 0;
> +		s->thread_args.commits_needed = view->nlines;
>  		break;

Is it ever possible for s->quit to be 1 there?

Should s->selected also be set to 0?  Keeping the selection position
doesn't make sense here, does it?

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de