Skip to content

Commit 1744307

Browse files
committed
fix hide bug
1 parent 436519a commit 1744307

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/terminal/terminal.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (t *Terminal) Run() error {
133133

134134
// Copy stdin to the pty and the pty to stdout.
135135
go func() { _ = lazyCopy(t.pty, os.Stdin) }()
136-
go func() { _ = lazyCopy(os.Stdout, t.proxy, t.canOutput) }()
136+
go func() { _ = lazyCopy(os.Stdout, t.proxy, t.hideAllOutput) }()
137137
_ = lazyCopy(t.proxy, t.pty)
138138
fmt.Printf("\r\n")
139139
return nil
@@ -151,8 +151,8 @@ func (t *Terminal) ShowOutput() {
151151
t.hideOutput = false
152152
}
153153

154-
func (t *Terminal) canOutput() bool {
154+
func (t *Terminal) hideAllOutput() bool {
155155
t.outputMutex.RLock()
156156
defer t.outputMutex.RUnlock()
157-
return !t.hideOutput
157+
return t.hideOutput
158158
}

0 commit comments

Comments
 (0)