lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Provide a way to temporarily hide "custom patch" panel

Open OliverJAsh opened this issue 5 years ago • 3 comments

Is your feature request related to a problem? Please describe. When I am selecting lines/chunks to add to a patch, I have this problem where it is difficult to see the full code I am selecting because the "custom patch" panel is taking up too much space. For example, here I have a chunk selected, but I have to scroll to see the full chunk:

image

Describe the solution you'd like I would prefer a workflow where I'm focused on selecting lines/chunks and then, when I'm done, switching to another view which just shows the custom patch. This is similar to what I would do outside of lazygit—I would run git add --patch and then, when I'm done, run git diff --cached to review the staged patch before committing. If I need to make more changes I can jump back to git add --patch.

Describe alternatives you've considered

Additional context #749 would also help with this

OliverJAsh avatar Jul 21 '20 08:07 OliverJAsh

You can get halfway there by tapping '+' until the currently focused panel takes up the whole screen, however at the moment it's not possible to focus the secondary panel. I'll need to add support for that

jesseduffield avatar Aug 12 '20 12:08 jesseduffield

I would love this as well. I generally want to preview changes before doing selection to stage, and I have to press + twice until the 3rd view, then same + twice to get out of it.

veremenko-y avatar Mar 31 '24 19:03 veremenko-y

As an alternative, what about hiding "Staged changes" and "Custom patch" windows until there's something selected.

veremenko-y avatar Mar 31 '24 20:03 veremenko-y