1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00
This commit is contained in:
Jesse Duffield
2022-01-05 12:01:59 +11:00
parent bbb5eee23a
commit 91fe68576c
37 changed files with 229 additions and 256 deletions

View File

@ -111,8 +111,7 @@ type Gui struct {
PauseBackgroundThreads bool
// Log of the commands that get run, to be displayed to the user.
CmdLog []string
OnRunCommand func(entry oscommands.CmdLogEntry)
CmdLog []string
// the extras window contains things like the command log
ShowExtrasWindow bool
@ -457,9 +456,7 @@ func NewGui(cmn *common.Common, gitCommand *commands.GitCommand, oSCommand *osco
gui.watchFilesForChanges()
onRunCommand := gui.GetOnRunCommand()
oSCommand.SetOnRunCommand(onRunCommand)
gui.OnRunCommand = onRunCommand
oSCommand.SetLogCommandFn(gui.logCommand)
gui.PopupHandler = &RealPopupHandler{gui: gui}
authors.SetCustomAuthors(gui.UserConfig.Gui.AuthorColors)
@ -625,6 +622,8 @@ func (gui *Gui) runSubprocessWithSuspense(subprocess oscommands.ICmdObj) (bool,
}
func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error {
gui.logCommand(cmdObj.ToString(), true)
subprocess := cmdObj.GetCmd()
subprocess.Stdout = os.Stdout
subprocess.Stderr = os.Stdout