jesseduffield / lazygit

simple terminal UI for git commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

c02y opened this issue · comments

commented

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

It seems there are issues with the delta pager.

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

commented

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.

ezoic increase your site revenue