1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

lots more refactoring

This commit is contained in:
Jesse Duffield
2023-03-21 20:57:52 +11:00
parent 8edad826ca
commit 509e3efa70
45 changed files with 779 additions and 729 deletions

View File

@@ -1,25 +1,12 @@
package gui
import (
"fmt"
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
"github.com/jesseduffield/lazygit/pkg/gui/presentation"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
)
func (gui *Gui) getMenuOptions() map[string]string {
keybindingConfig := gui.c.UserConfig.Keybinding
return map[string]string{
keybindings.Label(keybindingConfig.Universal.Return): gui.c.Tr.LcClose,
fmt.Sprintf("%s %s", keybindings.Label(keybindingConfig.Universal.PrevItem), keybindings.Label(keybindingConfig.Universal.NextItem)): gui.c.Tr.LcNavigate,
keybindings.Label(keybindingConfig.Universal.Select): gui.c.Tr.LcExecute,
}
}
// note: items option is mutated by this function
func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
if !opts.HideCancel {