summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorequa <equaa@protonmail.com>2021-04-24 18:55:31 -0500
committerequa <equaa@protonmail.com>2021-04-24 18:55:31 -0500
commitb712ef626a1d142b615a9af09d6fdc14c471bbae (patch)
treebfaf6741ff63798f3f2417cdf2916f6bf55d8b2a /lib
parentc4671476d4929394dee6cbae3a4f6efaafc6c6d5 (diff)
slightly better tab controls
Diffstat (limited to 'lib')
-rw-r--r--lib/transition.fnl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transition.fnl b/lib/transition.fnl
index e48411d..137789a 100644
--- a/lib/transition.fnl
+++ b/lib/transition.fnl
@@ -96,8 +96,10 @@
     (if (and (. boxes self.type) (> self.tab 0))
         ((. boxes self.type self.tab :action) self)
         (set self.transition true)))
-  (when (and (= key :tab) (. boxes self.type))
+  (when (and (or (= key :tab) (= key :right)) (. boxes self.type))
     (set self.tab (+ (% self.tab (length (. boxes self.type))) 1)))
+  (when (and (= key :left) (. boxes self.type))
+    (set self.tab (+ (% (- self.tab 2) (length (. boxes self.type))) 1)))
   )
 
 (fn mousepressed [self x y button]