Skip to content

Support split view in LazyGit/static pager output #338

@JannikWempe

Description

@JannikWempe

Summary

When using Hunk as a LazyGit custom pager, hunk pager --mode split still renders stacked output.

Reproduction

Configure LazyGit with Hunk as a pager:

git:
  pagers:
    - colorArg: always
      pager: hunk pager --mode split --line-numbers

Open a diff in LazyGit.

Expected behavior

Hunk renders a non-interactive side-by-side/split diff in LazyGit, similar in spirit to delta --side-by-side --paging=never.

Actual behavior

Hunk renders stacked rows, even though --mode split is provided.

Likely cause

LazyGit launches pagers in a captured pager host environment, so Hunk correctly avoids launching the interactive TUI and uses the static pager path added in #271.

That static renderer currently always builds stack rows:

  • src/core/startup.ts detects captured pager hosts and returns static-diff-pager
  • src/ui/staticDiffPager.ts renders via buildStackRows(...)

So --mode split is parsed, but it is not honored by the static renderer.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions