summaryrefslogtreecommitdiff
path: root/eventBindings.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventBindings.go')
-rw-r--r--eventBindings.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/eventBindings.go b/eventBindings.go
index f78737c..6e3f3a5 100644
--- a/eventBindings.go
+++ b/eventBindings.go
@@ -4,6 +4,7 @@
package main
import (
+ "fmt"
"syscall"
"time"
@@ -16,6 +17,12 @@ import (
// tells 'gocui' where to send events
func registerHandlers(g *gocui.Gui) {
+ defer func() {
+ if r := recover(); r != nil {
+ fmt.Fprintln(outf, "EVENT BINDINGS recovered in r", r)
+ return
+ }
+ }()
// mouse handlers
g.SetKeybinding("", gocui.MouseLeft, gocui.ModNone, mouseDown) // normal left mouse down
@@ -56,8 +63,15 @@ func registerHandlers(g *gocui.Gui) {
g.SetKeybinding("", 'q', gocui.ModNone, quit) // 'q' only exits gocui. plugin stays alive (?)
time.Sleep(100 * time.Millisecond)
+
+ fmt.Fprintln(outf, "hello world", time.Since(me.starttime))
+
+ // coreStdout()
+ // createStdout(g)
// tell 'tree' that we are okay to start talking to
me.myTree.InitOK()
+ me.ok = true // this tells init() it's okay to work with gocui
+
}
// flips on 'super mouse' mode // this was awesome for debugging gocui. never remove this code.