[pull] master from jesseduffield:master#235
Merged
pull[bot] merged 13 commits intoppker:masterfrom Mar 8, 2026
Merged
Conversation
"Remove" can be confusing when a deleted file is selected; in this cases it actually "un-removes" it. "Discard" hopefully makes it clearer that we are talking about the change to a file, and not the file itself.
Only mention resetting the patch when there actually is one. This way users have to read less text in the normal case, and the added note hopefully stands out more if there is one. Also, separate the note from the previous text by a blank line.
We don't add the commands to the menu when we're rebasing, so it's pointless to check this in the handlers. I guess alternatively we could add all commands always, and strike out the ones that are not applicable using DisabledReasons. But we don't usually do this in menus (except the global keybindings menu).
That's how we usually do this; it's useful to see in the keybindings menu that the command is disabled.
I always press 'd' in the patch building view, expecting that I can do exactly what I can do in the staging view, to find out I need to go space -> ctrl+p -> d and I think it's time to honour the muscle memory and support this convenience keybinding.
…hange from commit
I always press 'd' in the patch building view, expecting that I can do exactly what I can do in the staging view, to find out I need to go space -> ctrl+p -> d and I think it's time to honour the muscle memory and support this convenience keybinding. I recall we may have had a debate about this in the past and if so I'm renewing my stance.
This avoids a naming collision with GetFilter from the IFilterableContext interface, which will be implemented by FileTreeViewModel in the next commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When opening a filter prompt, reset PrevSearchIndex to -1 to avoid stale search state from a previous search/filter session. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without this check, the selection was being reset to 0 whenever ReApplyFilter was called for the current filter context, even when the user wasn't actively typing in the search prompt (e.g. when the model updates in the background). This was causing unexpected cursor jumps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change working tree files and commit files panels to use filtering (reducing the list) instead of search (highlighting matches). This matches the behavior of other filterable views. The text filter matches against the full file path, not just the filename, which is more useful for navigating large directory trees. When toggling a directory for a custom patch while a text filter is active, only the visible filtered files in the directory are affected, consistent with how staging a directory in the files panel works. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
### PR Description Way back when I implemented filter functionality I could not muster the motivation to apply it to the file views (files and commit files), but it really should be used on them. The text filter matches against the full file path (not just the filename), which is more useful for navigating large directory trees. When a text filter is active, all operations respect it consistently: - **Diffs**: selecting a filtered directory shows only the diff of visible files, not all files in the directory - **Staging/unstaging**: pressing space on a filtered directory only stages/unstages visible files - **Toggle all (a)**: only toggles staging for visible files - **Custom patch**: toggling a filtered directory only adds visible files to the patch Full disclosure, opus 4.6 wrote this entire PR but reviewing its changes they seem reasonable, and I have done some local testing and everything works as expected.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )