diff options
author | Sam Burville <Sam.Burville@GlobalProcessing.com> | 2021-10-17 18:22:59 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-10-22 22:38:26 +1100 |
commit | f6e316dfe5a35696e091f760e533a7a62f946f99 (patch) | |
tree | 2a9431d543b47ff4c74e9a9d3ccf74d6b755813c /pkg/gui/view_helpers.go | |
parent | 91e8765d9ca04aa88377f07d8abe665fb8fc66fe (diff) |
Improve JumpToBlock keybinding functionality
Improve experience when yaml file has != 5 keybindings and change view
helper to use the length of the array instead of hardcoded value.
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index ce836c59b..930d98a0c 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -322,7 +322,7 @@ func (gui *Gui) globalOptionsMap() map[string]string { gui.getKeyDisplay(keybindingConfig.Universal.Return): gui.Tr.LcCancel, gui.getKeyDisplay(keybindingConfig.Universal.Quit): gui.Tr.LcQuit, gui.getKeyDisplay(keybindingConfig.Universal.OptionMenu): gui.Tr.LcMenu, - fmt.Sprintf("%s-%s", gui.getKeyDisplay(keybindingConfig.Universal.JumpToBlock[0]), gui.getKeyDisplay(keybindingConfig.Universal.JumpToBlock[4])): gui.Tr.LcJump, + fmt.Sprintf("%s-%s", gui.getKeyDisplay(keybindingConfig.Universal.JumpToBlock[0]), gui.getKeyDisplay(keybindingConfig.Universal.JumpToBlock[len(keybindingConfig.Universal.JumpToBlock)-1])): gui.Tr.LcJump, } } |