From b3be88aed1e8196c5b0490a8e22c5839fdd12e18 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 19 Feb 2014 19:42:27 -0500 Subject: Fixed bug introduced by last commit; core/ui.lua --- core/ui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/ui.lua') 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] -- cgit v1.2.3