Download raw body.
tog ref -> log: ^L closes log view
On Tue, Dec 01, 2020 at 10:13:15PM +0100, Christian Weisgerber wrote:
> * start tog ref
> * pick refs/heads/main, hit enter for the log view
> * hit ^L to reload the log view
>   => the log view is closed, returning you to the ref view
This is because Ctrl-L in the log view is broken if the log view is running
as a split-screen child view. The same problem happens if a log view is
opened from a tree view, for example.
My guess is that this is another effect of the new_view/dead_view pointer
bugs in view_loop, which you already reported earlier. My plan to fix that
situation is to add a state variable to struct tog_view (with values such as
VIEW_STATE_NEW, VIEW_STATE_DEAD, etc.) and then have view_loop take actions
on views based on view->state, instead of trying to keep track of pointers.
During development of the ref view I saw the Ctrl-L/split-screen problem
in ref views after copying the Ctrl-L implementation from the log view.
I avoided the problem in the ref view by not destroying the current view
upon Ctrl-L and just reloading the data that gets displayed.
See input_ref_view(), case CTRL('l').
We could try to apply this approach to the log view, too.
tog ref -> log: ^L closes log view