diff options
Diffstat (limited to 'core/ui.lua')
-rw-r--r-- | core/ui.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/ui.lua b/core/ui.lua index 141c96f7..744b09e8 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -112,8 +112,8 @@ ui.dialogs = setmetatable({}, {__index = function(t, k) if k:find('input') then options.string_output, options.select_multiple = true, true end - local items = {} - for item in (value..'\n'):gmatch('([^\n]*)\n') do + local items, patt = {}, not k:find('input') and '[^\n]+' or '([^\n]*)\n' + for item in (value..'\n'):gmatch(patt) do items[#items + 1] = options.string_output and item or tonumber(item) + 1 end return button, options.select_multiple and items or items[1] |