Skip to content

Re-run pager-rendered diff output after resize#5358

Open
SergioChan wants to merge 1 commit intojesseduffield:masterfrom
SergioChan:fix/rerun-diff-pager-on-resize
Open

Re-run pager-rendered diff output after resize#5358
SergioChan wants to merge 1 commit intojesseduffield:masterfrom
SergioChan:fix/rerun-diff-pager-on-resize

Conversation

@SergioChan
Copy link

PR Description

Fixes #4415.

When a terminal resize happens while a diff is rendered through a PTY-backed pager (for example delta), lazygit previously only resized the PTY and kept the already-rendered pager output.

This change re-runs HandleRenderToMain() after resize whenever there are active PTY-backed views, so the current diff is regenerated using the new width.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

Validation

  • go test ./pkg/gui ./pkg/gui/controllers -run "TestScreenModeActions" -count=1
  • go test ./pkg/gui/... (partially ran; unrelated pre-existing failures in pkg/gui/presentation and pkg/gui/style on this environment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-run diff pager on terminal size change

1 participant