mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Add JumpToBlock keybinding
This should allow users to decide their own keybinding for jumping between blocks/panels. E.g. A user could choose 5-9 instead of 1-5.
This commit is contained in:
committed by
Jesse Duffield
parent
80a8e9b04d
commit
91e8765d9c
@ -1819,7 +1819,11 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
|
||||
// Appends keybindings to jump to a particular sideView using numbers
|
||||
for i, window := range []string{"status", "files", "branches", "commits", "stash"} {
|
||||
bindings = append(bindings, &Binding{ViewName: "", Key: rune(i+1) + '0', Modifier: gocui.ModNone, Handler: gui.goToSideWindow(window)})
|
||||
bindings = append(bindings, &Binding{
|
||||
ViewName: "",
|
||||
Key: gui.getKey(config.Universal.JumpToBlock[i]),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.goToSideWindow(window)})
|
||||
}
|
||||
|
||||
for viewName := range gui.State.Contexts.initialViewTabContextMap() {
|
||||
|
Reference in New Issue
Block a user