Skip to content

Fix: preserve half screen mode when exiting commit filtering#5350

Open
Xavrir wants to merge 4 commits intojesseduffield:masterfrom
Xavrir:fix/preserve-half-screen-mode-on-filter-exit
Open

Fix: preserve half screen mode when exiting commit filtering#5350
Xavrir wants to merge 4 commits intojesseduffield:masterfrom
Xavrir:fix/preserve-half-screen-mode-on-filter-exit

Conversation

@Xavrir
Copy link

@Xavrir Xavrir commented Mar 9, 2026

Fixes #5179

When filtering commits, lazygit automatically switches to half-screen mode if the user is in normal mode. However, when exiting the filter, it was unconditionally resetting to normal mode, even if the user had configured half-screen mode as their default.

This fix tracks whether filtering forced the screen mode change. On exit, it only restores normal mode if the half-screen mode was forced by filtering, preserving any user-configured half-screen preference.

Changes:

  • Track forced half-screen mode in the filtering state
  • Only restore normal mode on filter exit if half-screen was forced
  • Add unit test covering the screen mode restoration logic
  • Add integration test verifying the behavior with configured half-screen mode

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.

screenMode: half does not apply after the filter is reset

1 participant