[choice] Fix default nowrap value.

master
Lorenzo Cogotti 2 years ago
parent 91ed7f50f5
commit 432e913f4b

@ -42,7 +42,7 @@ function Choice.new(args)
self.color = self.color or core.theme.color self.color = self.color or core.theme.color
self.hovered = false self.hovered = false
self.choices = self.choices or { "" } self.choices = self.choices or { "" }
self.nowrap = self.nowrap or #self.choices == 0 self.nowrap = self.nowrap or #self.choices < 2
self.index = 1 -- by default self.index = 1 -- by default
for i,choice in ipairs(self.choices) do for i,choice in ipairs(self.choices) do

Loading…
Cancel
Save