diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-03-01 10:03:05 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-03-02 10:12:03 +0100 |
commit | 98d6504d1d2572e404dbaa8eaf78683c0eba485e (patch) | |
tree | 479a39d2241e305e99ca1568a9f50b1c39514f2d /pkg/gui/controllers | |
parent | afb9980ad9ea2885b8d988bbad643b58dc69e6fe (diff) |
Make ctrl-f available in staging view
A common workflow for me is to create a fixup commit from only some of my
current changes; to do that, I enter a file, stage a few hunks, and then want to
invoke ctrl-f to find the base commit for these changes. Currently I need to esc
back to the files panel in order to do that; it's more convenient to be able to
do this right from the staging panel.
Diffstat (limited to 'pkg/gui/controllers')
-rw-r--r-- | pkg/gui/controllers/staging_controller.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/controllers/staging_controller.go b/pkg/gui/controllers/staging_controller.go index 13d896be8..c698ff68f 100644 --- a/pkg/gui/controllers/staging_controller.go +++ b/pkg/gui/controllers/staging_controller.go @@ -99,6 +99,12 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ Handler: self.c.Helpers().WorkingTree.HandleCommitEditorPress, Description: self.c.Tr.CommitChangesWithEditor, }, + { + Key: opts.GetKey(opts.Config.Files.FindBaseCommitForFixup), + Handler: self.c.Helpers().FixupHelper.HandleFindBaseCommitForFixupPress, + Description: self.c.Tr.FindBaseCommitForFixup, + Tooltip: self.c.Tr.FindBaseCommitForFixupTooltip, + }, } } |