mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
start moving commit panel handlers into controller
more and more move rebase commit refreshing into existing abstraction and more and more WIP and more handling clicks properly fix merge conflicts update cheatsheet lots more preparation to start moving things into controllers WIP better typing expand on remotes controller moving more code into controllers
This commit is contained in:
@ -22,7 +22,7 @@ import (
|
||||
// So we call logAction to log the 'Stage File' part and then we call logCommand to log the command itself.
|
||||
// We pass logCommand to our OSCommand struct so that it can handle logging commands
|
||||
// for us.
|
||||
func (gui *Gui) logAction(action string) {
|
||||
func (gui *Gui) LogAction(action string) {
|
||||
if gui.Views.Extras == nil {
|
||||
return
|
||||
}
|
||||
@ -32,7 +32,7 @@ func (gui *Gui) logAction(action string) {
|
||||
fmt.Fprint(gui.Views.Extras, "\n"+style.FgYellow.Sprint(action))
|
||||
}
|
||||
|
||||
func (gui *Gui) logCommand(cmdStr string, commandLine bool) {
|
||||
func (gui *Gui) LogCommand(cmdStr string, commandLine bool) {
|
||||
if gui.Views.Extras == nil {
|
||||
return
|
||||
}
|
||||
@ -52,23 +52,23 @@ func (gui *Gui) logCommand(cmdStr string, commandLine bool) {
|
||||
|
||||
func (gui *Gui) printCommandLogHeader() {
|
||||
introStr := fmt.Sprintf(
|
||||
gui.Tr.CommandLogHeader,
|
||||
gui.getKeyDisplay(gui.UserConfig.Keybinding.Universal.ExtrasMenu),
|
||||
gui.c.Tr.CommandLogHeader,
|
||||
gui.getKeyDisplay(gui.c.UserConfig.Keybinding.Universal.ExtrasMenu),
|
||||
)
|
||||
fmt.Fprintln(gui.Views.Extras, style.FgCyan.Sprint(introStr))
|
||||
|
||||
if gui.UserConfig.Gui.ShowRandomTip {
|
||||
if gui.c.UserConfig.Gui.ShowRandomTip {
|
||||
fmt.Fprintf(
|
||||
gui.Views.Extras,
|
||||
"%s: %s",
|
||||
style.FgYellow.Sprint(gui.Tr.RandomTip),
|
||||
style.FgYellow.Sprint(gui.c.Tr.RandomTip),
|
||||
style.FgGreen.Sprint(gui.getRandomTip()),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
func (gui *Gui) getRandomTip() string {
|
||||
config := gui.UserConfig.Keybinding
|
||||
config := gui.c.UserConfig.Keybinding
|
||||
|
||||
formattedKey := func(key string) string {
|
||||
return gui.getKeyDisplay(key)
|
||||
|
Reference in New Issue
Block a user