summaryrefslogtreecommitdiff
path: root/toolkit/gocui/keybindings.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/gocui/keybindings.go')
-rw-r--r--toolkit/gocui/keybindings.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/toolkit/gocui/keybindings.go b/toolkit/gocui/keybindings.go
index 18d3097..c449906 100644
--- a/toolkit/gocui/keybindings.go
+++ b/toolkit/gocui/keybindings.go
@@ -38,6 +38,8 @@ func defaultKeybindings(g *gocui.Gui) error {
return nil
}
+var showDebug bool = true
+
// dump out the widgets
func addDebugKeys(g *gocui.Gui) {
// dump all widget info to the log
@@ -45,6 +47,13 @@ func addDebugKeys(g *gocui.Gui) {
func(g *gocui.Gui, v *gocui.View) error {
log(logNow, "gocui.SetKeyBinding() dumpTree() START")
me.rootNode.dumpTree(true)
+ if (showDebug) {
+ me.rootNode.showFake()
+ showDebug = false
+ } else {
+ me.rootNode.hideFake()
+ showDebug = true
+ }
return nil
})