summaryrefslogtreecommitdiff
path: root/eventBindings.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-03 01:56:01 -0500
committerJeff Carr <[email protected]>2025-09-03 01:56:01 -0500
commit86aa5fb001bb873da1a491391f12b17a1a1990a0 (patch)
tree772cb747816a01d109d7f870389bce582eec39eb /eventBindings.go
parent262426fb448d8bd616d1ed687f3da7e1ed2dc6a2 (diff)
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 5e06f8b..d355156 100644
--- a/eventBindings.go
+++ b/eventBindings.go
@@ -58,6 +58,7 @@ func registerHandlers(g *gocui.Gui) {
g.SetKeybinding("", 'L', gocui.ModNone, printWidgetTree) // 'L' list all widgets in tree view
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("", 'r', gocui.ModNone, reverseStdout) // 'r' turns scrolling of STDOUT upside down
g.SetKeybinding("", 'q', gocui.ModNone, quit) // 'q' only exits gocui. plugin stays alive (?)
}
@@ -184,6 +185,19 @@ func theFind(g *gocui.Gui, v *gocui.View) error {
return nil
}
+func reverseStdout(g *gocui.Gui, v *gocui.View) error {
+ if me.stdout.reverse {
+ me.stdout.reverse = false
+ log.Info("stdout scrolling normal")
+ } else {
+ me.stdout.reverse = true
+ log.Info("stdout scrolling is reversed. this is sometimes useful when you")
+ log.Info("only need to see a few most recent lines and have the STDOUT window")
+ log.Info("take up minimal realestate at the bottom of your window")
+ }
+ return nil
+}
+
// is run whenever anyone hits 'd' (in an open space)
func theLetterD(g *gocui.Gui, v *gocui.View) error {
// widgets that don't have physical existance in