[choice] Fix default nowrap value.

This commit is contained in:
Lorenzo Cogotti 2022-10-02 16:45:35 +02:00
parent 91ed7f50f5
commit 432e913f4b
1 changed files with 1 additions and 1 deletions

View File

@ -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