summaryrefslogtreecommitdiff
path: root/gocui.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocui.go')
-rw-r--r--gocui.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/gocui.go b/gocui.go
index 13c3b78..c7f4011 100644
--- a/gocui.go
+++ b/gocui.go
@@ -1,3 +1,6 @@
+// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
+// Use of this source code is (now) governed by the GPL 3.0
+
// Copyright 2014 The gocui Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -13,8 +16,6 @@ import (
"go.wit.com/log"
)
-var ecount int = 3
-
// Thanks to the gocui developers -- your package kicks ass
// This function is called on every event. It is a callback function from the gocui package
// which has an excellent implementation. While gocui handles things like text highlighting
@@ -22,7 +23,7 @@ var ecount int = 3
// complicated console handling, it sends events here in a clean way.
// This is equivalent to the linux command xev (apt install x11-utils)
func gocuiEvent(g *gocui.Gui) error {
- ecount += 1
+ me.ecount += 1
maxX, maxY := g.Size()
mx, my := g.MousePosition()
log.Verbose("handleEvent() START", maxX, maxY, mx, my, msgMouseDown)
@@ -36,7 +37,7 @@ func gocuiEvent(g *gocui.Gui) error {
// setOutput(me.logStdout)
// me.logStdout.Write("test out")
w := me.logStdout.TK.(*guiWidget)
- msg := fmt.Sprintf("test out gocuiEvent() %d\n", ecount)
+ msg := fmt.Sprintf("test out gocuiEvent() %d\n", me.ecount)
w.Write([]byte(msg))
// log.CaptureMode(w)
log.Log(NOW, "logStdout test out")