Skip to content

Commit 1a880f9

Browse files
committed
Remove unused keybinding handler
It's never called, the binding ListController.HandleGotoBottom wins. The functionality of loading more commits is implemented by GetOnFocus, and this way it works not only for '>', but also for other navigation keys like page down.
1 parent a27db87 commit 1a880f9

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

pkg/gui/controllers/local_commits_controller.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,6 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
207207
Description: self.c.Tr.MarkAsBaseCommit,
208208
Tooltip: self.c.Tr.MarkAsBaseCommitTooltip,
209209
},
210-
// overriding this navigation keybinding because we might need to load
211-
// more commits on demand
212-
{
213-
Key: opts.GetKey(opts.Config.Universal.GotoBottom),
214-
Handler: self.gotoBottom,
215-
Description: self.c.Tr.GotoBottom,
216-
Tag: "navigation",
217-
},
218210
}
219211

220212
for _, binding := range outsideFilterModeBindings {
@@ -1154,20 +1146,6 @@ func (self *LocalCommitsController) openSearch() error {
11541146
return self.c.Helpers().Search.OpenSearchPrompt(self.context())
11551147
}
11561148

1157-
func (self *LocalCommitsController) gotoBottom() error {
1158-
// we usually lazyload these commits but now that we're jumping to the bottom we need to load them now
1159-
if self.context().GetLimitCommits() {
1160-
self.context().SetLimitCommits(false)
1161-
if err := self.c.Refresh(types.RefreshOptions{Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS}}); err != nil {
1162-
return err
1163-
}
1164-
}
1165-
1166-
self.context().SetSelectedLineIdx(self.context().Len() - 1)
1167-
1168-
return nil
1169-
}
1170-
11711149
func (self *LocalCommitsController) handleOpenLogMenu() error {
11721150
return self.c.Menu(types.CreateMenuOptions{
11731151
Title: self.c.Tr.LogMenuTitle,

0 commit comments

Comments
 (0)