diff options
author | 2014-01-16 20:47:43 -0500 | |
---|---|---|
committer | 2014-01-16 20:47:43 -0500 | |
commit | dfd67d28030009d69c2f92938fdaabf64054b346 (patch) | |
tree | 6ee157422946cebca078945b377fbec0c840e50d /core/ui.lua | |
parent | cb0a8dbdfef18f11837ada591af7e99b793b95a6 (diff) | |
download | textadept-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.lua | 6 |
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 |