diff options
author | 2014-02-19 19:42:27 -0500 | |
---|---|---|
committer | 2014-02-19 19:42:27 -0500 | |
commit | b3be88aed1e8196c5b0490a8e22c5839fdd12e18 (patch) | |
tree | f018a4fb0dae4d37104541402f82906ac56bc3a6 /core/ui.lua | |
parent | 0cde905a4c44d4ca60b9e6d121cfef70fb397fc3 (diff) | |
download | textadept-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.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] |