Skip to content

Unable to scroll the post-checkout hook error popup #4372

@TimShilov

Description

@TimShilov

Describe the bug
When the post-checkout hook fails, lazygit shows the popup covering most of the UI with the output, which is great!
However, it seems like you can only scroll this output by one line, using j and k. Hitting Ctrl+d/Ctrl+u scrolls the git log underneath (which is barely even visible).
I'm working in a huge monorepo and sometimes the output is really big. The reason for the hook failure is usually at the very bottom of the output and to actually see it I have to hold j for a very long time and most of the time I just end up going outside of the lazygit to run the same command that the hook is running so that I can see the output.

To Reproduce
Steps to reproduce the behavior:

  1. Create a post-checkout hook in <repo root>/.git/hooks/post-checkout with the following content
#!/bin/bash

echo $(man less)
exit 1
  1. Make sure it's executable with sudo chmod +x .git/hooks/post-checkout.
  2. Switch to another branch by selecting it in the "Local branches" panel (3) and hitting Space.
  3. See the popup with an big output appear
  4. Try to scroll that popup.

Expected behavior
When the output popup is displayed, I would expect Crtl+d and Ctrl+u to scroll the popup contents rather than git log.
Maybe it would be reasonable to scroll to the end of the output automatically, because the popup shows Error and the error is most likely at the bottom of the output.

Screenshots

Image

Version info:
Run lazygit --version and paste the result here

commit=, build date=, build source=nix, version=0.48.0, os=darwin, arch=arm64, git version=2.39.5 (Apple Git-154)

Run git --version and paste the result here

git version 2.39.5 (Apple Git-154)

Additional context
I'm happy to try submitting a PR, but I haven't contributed to this project before so I'll need to spend some time digesting contributing guide and just getting familiar with the project.
If someone could point me to the right direction, that would also be highly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions