feat(status): add keybind for full diff view from status menu, fix reload with recent fzf versions#70
Open
iloveitaly wants to merge 1 commit intobigH:mainfrom
Open
feat(status): add keybind for full diff view from status menu, fix reload with recent fzf versions#70iloveitaly wants to merge 1 commit intobigH:mainfrom
iloveitaly wants to merge 1 commit intobigH:mainfrom
Conversation
…load with recent fzf versions - Adds inspect (Alt-I) key to open a file's diff in pager from status menu. - Binds new inspect key and displays hint in header. - Implements helper to show diff, including for directories and renamed files. Generated-by: aiautocommit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds inspect (Alt-I) key to open a file's diff in pager from status menu.
More important change is the reload functionality is now fixed with recent fzf versions. Was working 0.66 for me and broke on 0.70. Here's the AI research on what changed.
fzf 0.70 changed async reload behavior
fzf 0.70 introduced significant internal performance improvements (1.3–1.9x faster filtering/rendering). As a side effect, the async
reload:action now resets cursor position when the new list arrives — it no longer preserves the numeric cursor offset that was set by a precedingdownaction.The old action chain was:
This relied on
downrunning first, thenreload:arriving asynchronously while fzf preserved the cursor position. In fzf 0.70, the async reload overtakes/resets the position.The fix:
reload-syncreload-sync(available since fzf 0.36.0) performs a synchronous reload — fzf blocks until the new list is fully loaded before executing subsequent actions. Reordering to:means
downruns against the already-settled, final list. No race condition, no position reset.--trackis not a viable alternative here because the status prefix changes on staging (M→M), so fzf can't match the item identity across the reload.The synchronous block is imperceptible in practice since
git status -scompletes in sub-millisecond time for typical repos.