summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 6ee63e34c..456a62a6c 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -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