Skip to content

fix(compact): file switch state - #513

Open
caenrique wants to merge 2 commits into
esmuellert:mainfrom
caenrique:fix/compact-file-switch-state
Open

fix(compact): file switch state#513
caenrique wants to merge 2 commits into
esmuellert:mainfrom
caenrique:fix/compact-file-switch-state

Conversation

@caenrique

Copy link
Copy Markdown

Problem

When switching files, the new buffers can briefly use folds from the previous file. Opening an empty diff also disables compact mode for the rest of the session.

Solution

Suspend compact folds while buffers are being replaced or while the current view has no changes. Reapply them after the next diff is rendered while preserving the compact-mode state.

Testing

Added regressions for buffer swaps and returning from an empty single-file view. The compact test suite passes with 32 tests.

@caenrique

Copy link
Copy Markdown
Author

This is related to other fold issue I also addressed here #512

@caenrique caenrique changed the title Fix/compact file switch state fix(compact): file switch state Aug 3, 2026
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.

1 participant