summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-27 18:59:18 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-30 18:35:23 +1000
commitbc4ce26ceff7ff2d8ac5fdc914aea24691591af8 (patch)
tree46bd4b485b3cfc5287f3d9117e9343c661f89aad /pkg/gui
parentae66f720f56842d72f9c482d4da824d318e202ec (diff)
Allow entering a worktree by pressing enter
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/controllers/worktrees_controller.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/gui/controllers/worktrees_controller.go b/pkg/gui/controllers/worktrees_controller.go
index 3a051e719..6b403f0ee 100644
--- a/pkg/gui/controllers/worktrees_controller.go
+++ b/pkg/gui/controllers/worktrees_controller.go
@@ -40,6 +40,11 @@ func (self *WorktreesController) GetKeybindings(opts types.KeybindingsOpts) []*t
Description: self.c.Tr.SwitchToWorktree,
},
{
+ Key: opts.GetKey(opts.Config.Universal.Confirm),
+ Handler: self.checkSelected(self.enter),
+ Description: self.c.Tr.SwitchToWorktree,
+ },
+ {
Key: opts.GetKey(opts.Config.Universal.OpenFile),
Handler: self.checkSelected(self.open),
Description: self.c.Tr.OpenInEditor,