Skip to content

Pager/paging is not working when focus is in "Unstaged Changes" or "Staged Changes" window #1939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
c02y opened this issue May 11, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@c02y
Copy link

c02y commented May 11, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. open a git repo using lazygit
  2. switch focus to a modified file in Files side panel
  3. check the Unstaged Changed and Staged Changes, the pager is working fine
  4. Enter on the file, the focus will be in the Staged Changes, the pager is not working now

Expected behavior
A clear and concise description of what you expected to happen.
pager will work when focus is in the "Unstaged Changes" or "Staged Changes" window, I need the pager to highlight the modified/deleted/added word-by-word instead of simply lines.

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Desktop (please complete the following information):

  • OS: [e.g. Windows] Arch Linux 5.17.5-zen1-1-zen
  • Lazygit Version [e.g. v0.1.45] v0.34 installed from Arch Linux official repo
  • The last commit id if you built project from sources (run : git rev-parse HEAD)

Additional context
Add any other context about the problem here.

My related config:

git:
  paging:
    colorArg: always
    useConfig: false
    pager: delta --paging=never --line-numbers
@c02y c02y added the bug Something isn't working label May 11, 2022
@mark2185
Copy link
Collaborator

It seems there are issues with the delta pager.

If this is still a problem, please consider switching until it gets fixed.

@c02y
Copy link
Author

c02y commented Aug 5, 2022

Not really, I tried diff-so-fancy (use config from https://github.com./jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md) , it doesn't show bg colors of diffs as well when I switch focus into Unstaged/Staged Changes windows, and more importantly, lazygit crashed like 100% when I exit from this focus using Escape

$ lazygit --version
commit=v0.35, build date=2022-07-20T10:20:42Z, build source=binaryRelease, version=0.35, os=linux, arch=amd64

$ lazygit
2022/08/05 15:59:23 An error occurred! Please create an issue at: https://github.com./jesseduffield/lazygit/issues

syscall.Errno bad file descriptor
github.com./jesseduffield/lazygit/pkg/app/app.go:52 (0x5620b5fce736)
github.com./jesseduffield/lazygit/main.go:154 (0x5620b5fdc190)
runtime/proc.go:250 (0x5620b59c97d3)
runtime/asm_amd64.s:1571 (0x5620b59f7261)

I tried ydiff (use config from https://github.com./jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md), it doesn't display bg diff colors like the demo screenshot at all.
image

So I think there are a lot of issues for custom_pager code in lazygit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants