aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-21 21:07:49 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-21 21:07:49 -0400
commitd97cdde38dfaf8d7f63d5f86eb9eac4eab359dc4 (patch)
tree2b24c171826ae8fcb26a7d97d06391f0af9b3d1d /widgets
parent0b26241b42153e83eec9a0333d138f4972fd59ab (diff)
Skip writes if term is closed
Diffstat (limited to 'widgets')
-rw-r--r--widgets/terminal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go
index d817023..5b0be1a 100644
--- a/widgets/terminal.go
+++ b/widgets/terminal.go
@@ -120,7 +120,7 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) {
buf := make([]byte, 4096)
for {
n, err := term.pty.Read(buf)
- if err != nil {
+ if err != nil || term.closed {
// These are generally benine errors when the process exits
term.Close(nil)
return