summaryrefslogtreecommitdiff
path: root/toolkit/gocui/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/gocui/main.go')
-rw-r--r--toolkit/gocui/main.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/toolkit/gocui/main.go b/toolkit/gocui/main.go
index 4b66153..0dd2c0a 100644
--- a/toolkit/gocui/main.go
+++ b/toolkit/gocui/main.go
@@ -60,10 +60,17 @@ func catchActionChannel() {
func Exit() {
// TODO: what should actually happen here?
+ standardExit()
+}
+
+func standardExit() {
me.baseGui.Close()
+ outf.Close()
+ setOutput(os.Stdout)
sendBackQuit()
+ sleep(.5)
+ exit()
}
-
func sendBackQuit() {
// send 'Quit' back to the program (?)
var a toolkit.Action
@@ -89,7 +96,5 @@ func main() {
MouseMain()
log(true, "MouseMain() closed")
- me.baseGui.Close()
-
- sendBackQuit()
+ standardExit()
}