Skip to content

Crash when switch to fullscreen mode, with delta as custom pager on Windows. #5837

Description

@CoolDove

Describe the bug

Lazygit crashes when press + to switch fullscreen mode. Only happens when I set a custom pager.
If I remove the custom pager setting in config.yml, it doesn't crash anymore.

To Reproduce

  1. Install delta, set it as custom pager. In config.yml:
git:
    pagers:
      - pager: delta --dark --paging=never
  1. Open lazygit in any repository.
  2. Press l to move the cursor to Local branches panel.
  3. Press + and + to switch to fullscreen mode.
  4. Lazygit crashes.

Screenshots

Image

Version info:

commit=aafe61082e7ed383d318fd40e48f85645e6afc7b, build date=2026-07-15T11:34:26Z, build source=binaryRelease, version=0.63.1, os=windows, arch=amd64, git version=2.42.0.windows.2

Terminal info:

wezterm 20250703-070941-c7f4b081

Stacktrace

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x7ff73a9c14f8]

goroutine 2472 [running]:
bufio.(*Scanner).Scan(0xc0001c0080)
        /opt/hostedtoolcache/go/1.25.12/x64/src/bufio/scan.go:219 +0x818
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).newPtyTask.func1.(*ViewBufferManager).NewCmdTask.4.4()
        /home/runner/work/lazygit/lazygit/pkg/tasks/tasks.go:222 +0x9d
github.com/jesseduffield/lazygit/pkg/utils.Safe.func1()
        /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:70 +0x13
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0xc0000b8008?)
        /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:81 +0x56
github.com/jesseduffield/lazygit/pkg/utils.Safe(0x0?)
        /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:70 +0x29
created by github.com/jesseduffield/lazygit/pkg/gui.(*Gui).newPtyTask.func1.(*ViewBufferManager).NewCmdTask.4 in goroutine 2619
        /home/runner/work/lazygit/lazygit/pkg/tasks/tasks.go:220 +0x53b

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