mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-13 01:30:53 +02:00
move function
This commit is contained in:
@ -295,3 +295,17 @@ func (gui *Gui) refreshSuggestions() {
|
|||||||
return func() { gui.setSuggestions(suggestions) }
|
return func() { gui.setSuggestions(suggestions) }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gui *Gui) handleAskFocused() error {
|
||||||
|
keybindingConfig := gui.c.UserConfig.Keybinding
|
||||||
|
|
||||||
|
message := utils.ResolvePlaceholderString(
|
||||||
|
gui.c.Tr.CloseConfirm,
|
||||||
|
map[string]string{
|
||||||
|
"keyBindClose": gui.getKeyDisplay(keybindingConfig.Universal.Return),
|
||||||
|
"keyBindConfirm": gui.getKeyDisplay(keybindingConfig.Universal.Confirm),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
return gui.renderString(gui.Views.Options, message)
|
||||||
|
}
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type credentials chan string
|
type credentials chan string
|
||||||
@ -56,17 +55,3 @@ func (gui *Gui) handleCloseCredentialsView() error {
|
|||||||
gui.credentials <- ""
|
gui.credentials <- ""
|
||||||
return gui.c.PopContext()
|
return gui.c.PopContext()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) handleAskFocused() error {
|
|
||||||
keybindingConfig := gui.c.UserConfig.Keybinding
|
|
||||||
|
|
||||||
message := utils.ResolvePlaceholderString(
|
|
||||||
gui.c.Tr.CloseConfirm,
|
|
||||||
map[string]string{
|
|
||||||
"keyBindClose": gui.getKeyDisplay(keybindingConfig.Universal.Return),
|
|
||||||
"keyBindConfirm": gui.getKeyDisplay(keybindingConfig.Universal.Confirm),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
return gui.renderString(gui.Views.Options, message)
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user