aboutsummaryrefslogtreecommitdiff
path: root/core/ui.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-02-19 19:42:27 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2014-02-19 19:42:27 -0500
commitb3be88aed1e8196c5b0490a8e22c5839fdd12e18 (patch)
treef018a4fb0dae4d37104541402f82906ac56bc3a6 /core/ui.lua
parent0cde905a4c44d4ca60b9e6d121cfef70fb397fc3 (diff)
downloadtextadept-b3be88aed1e8196c5b0490a8e22c5839fdd12e18.tar.gz
textadept-b3be88aed1e8196c5b0490a8e22c5839fdd12e18.zip
Fixed bug introduced by last commit; core/ui.lua
Diffstat (limited to 'core/ui.lua')
-rw-r--r--core/ui.lua4
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]