The fix for issue #37 broke the tab key from a text widget for me.
I think that the problem is a confusion on what the return type and value of the event should be, because this fixed it for me:
diff --git a/luigi/widget/text.lua b/luigi/widget/text.lua
index 23813f1..5d3482c 100644
--- a/luigi/widget/text.lua
+++ b/luigi/widget/text.lua
@@ -381,9 +381,9 @@ This color is used to indicate the selected range of text.
local act = self.keyActions[event.key]
if act then
local result = act()
- if result then return true end
+ if result then return end
end
- return false
+ return true
end)
self:onDisplay(function (event)
By type I mean that Event:emit checks explicitly for nil:
The fix for issue #37 broke the tab key from a text widget for me.
I think that the problem is a confusion on what the return type and value of the event should be, because this fixed it for me:
By type I mean that Event:emit checks explicitly for nil: