From c215e3c2c4aaa8fe1b97d9ba4dd8c4a748f4f8c2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 13 Feb 2025 14:22:33 -0600 Subject: still moving everything to initPlugin() --- eventBindings.go | 12 ------------ init.go | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/eventBindings.go b/eventBindings.go index 6e3f3a5..02f33a6 100644 --- a/eventBindings.go +++ b/eventBindings.go @@ -6,7 +6,6 @@ package main import ( "fmt" "syscall" - "time" "github.com/awesome-gocui/gocui" "go.wit.com/log" @@ -61,17 +60,6 @@ func registerHandlers(g *gocui.Gui) { g.SetKeybinding("", 'f', gocui.ModNone, theFind) // 'f' shows what is under your mouse g.SetKeybinding("", 'd', gocui.ModNone, theLetterD) // 'd' toggles on and off debugging buttons 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. diff --git a/init.go b/init.go index 646aee0..92e4e3d 100644 --- a/init.go +++ b/init.go @@ -126,6 +126,16 @@ func initPlugin() { // registered event handlers still have the events sent to gocuiEvent() above registerHandlers(g) + 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 + go gocuiMain() } -- cgit v1.2.3