aboutsummaryrefslogtreecommitdiff
path: root/core/ui.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-01-16 20:47:43 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2014-01-16 20:47:43 -0500
commitdfd67d28030009d69c2f92938fdaabf64054b346 (patch)
tree6ee157422946cebca078945b377fbec0c840e50d /core/ui.lua
parentcb0a8dbdfef18f11837ada591af7e99b793b95a6 (diff)
downloadtextadept-dfd67d28030009d69c2f92938fdaabf64054b346.tar.gz
textadept-dfd67d28030009d69c2f92938fdaabf64054b346.zip
Added support for multiple entry boxes in inputdialogs.
Requires latest gtdialog hg (r67).
Diffstat (limited to 'core/ui.lua')
-rw-r--r--core/ui.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/ui.lua b/core/ui.lua
index dd0fd522..fa2d5d51 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -105,9 +105,13 @@ ui.dialogs = setmetatable({}, {__index = function(t, k)
local files = {}
for file in result:gmatch('[^\n]+') do files[#files + 1] = file end
return files
- elseif k == 'filteredlist' then
+ elseif k == 'filteredlist' or
+ k:find('input') and result:match('^[^\n]+\n?(.*)$'):find('\n') then
local button, value = result:match('^([^\n]+)\n?(.*)$')
if not options.string_output then button = tonumber(button) end
+ if k:find('input') then
+ options.string_output, options.select_multiple = true, true
+ end
local items = {}
for item in value:gmatch('[^\n]+') do
items[#items + 1] = options.string_output and item or tonumber(item) + 1