Skip to content

Commit

Permalink
Add shortcuts for filtering files by status
Browse files Browse the repository at this point in the history
- 's' for showing only staged files
- 'u' for showing only unstaged files
- 'r' for resetting the filter
  • Loading branch information
mark2185 committed Nov 30, 2023
1 parent d8059d7 commit abb85e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/gui/controllers/files_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,18 +639,21 @@ func (self *FilesController) handleStatusFilterPressed() error {
OnPress: func() error {
return self.setStatusFiltering(filetree.DisplayStaged)
},
Key: 's',
},
{
Label: self.c.Tr.FilterUnstagedFiles,
OnPress: func() error {
return self.setStatusFiltering(filetree.DisplayUnstaged)
},
Key: 'u',
},
{
Label: self.c.Tr.ResetFilter,
OnPress: func() error {
return self.setStatusFiltering(filetree.DisplayAll)
},
Key: 'r',
},
},
})
Expand Down

0 comments on commit abb85e0

Please sign in to comment.