From 1e7811334e9d4cbf5cbb5992dc0f75db983d1c6d Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 18 Sep 2016 12:56:13 +0300 Subject: [PATCH] use the same goroutine to wait preview command Mentioned in #5. --- ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.go b/ui.go index 7ab1bc5..99d1abd 100644 --- a/ui.go +++ b/ui.go @@ -353,8 +353,8 @@ func (ui *UI) loadFile(nav *Nav) { log.Print(msg) } + defer cmd.Wait() defer out.Close() - go func() { defer cmd.Wait() }() reader = out } else { f, err := os.Open(path)