summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuka Markušić <markusicluka@gmail.com>2023-11-30 08:01:16 +0100
committerJesse Duffield <jessedduffield@gmail.com>2024-01-26 20:53:16 +1100
commitefb6524fa046005ff1437dbd8bb1d39093096a21 (patch)
tree24467ef64bf0a1db3f171bc17ae1a11a492d2052
parenta65f003ccc567fd53af7581ec80930464c9c7f4f (diff)
Add shortcuts for filtering files by status
- 's' for showing only staged files - 'u' for showing only unstaged files - 'r' for resetting the filter
-rw-r--r--pkg/gui/controllers/files_controller.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go
index eed5f9547..bc797c219 100644
--- a/pkg/gui/controllers/files_controller.go
+++ b/pkg/gui/controllers/files_controller.go
@@ -670,18 +670,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',
},
},
})