aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/snapopen.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-06-22 15:22:25 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-06-22 15:22:25 -0400
commit73699db214f70901d642866f4233fbc99fa792a6 (patch)
tree9ee6e9d5bc02f377fadd4c99dd055527097768bb /modules/textadept/snapopen.lua
parent4bca2f464a111f8561cc69d79b0a202be1da4d48 (diff)
downloadtextadept-73699db214f70901d642866f4233fbc99fa792a6.tar.gz
textadept-73699db214f70901d642866f4233fbc99fa792a6.zip
Resize most filteredlists to fit the ncurses screen.
Diffstat (limited to 'modules/textadept/snapopen.lua')
-rw-r--r--modules/textadept/snapopen.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/snapopen.lua b/modules/textadept/snapopen.lua
index 67da1ff1..dd379d48 100644
--- a/modules/textadept/snapopen.lua
+++ b/modules/textadept/snapopen.lua
@@ -157,8 +157,9 @@ function M.open(utf8_paths, filter, exclude_PATHS, exclude_FILTER, depth)
M.MAX),
'--button1', _L['_OK'])
end
+ local width = NCURSES and { '--width', gui.size[1] - 2 } or ''
local utf8_filenames = gui.filteredlist(_L['Open'], _L['File'], list, false,
- '--select-multiple') or ''
+ '--select-multiple', width) or ''
for filename in utf8_filenames:gmatch('[^\n]+') do io.open_file(filename) end
end