diff options
Diffstat (limited to 'modules/textadept/snippets.lua')
-rw-r--r-- | modules/textadept/snippets.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 6a664792..da6193df 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -189,11 +189,12 @@ function M._select() for i = 1, #list do t[#t + 1], t[#t + 2], t[#t + 3] = list[i]:match('^(%Z+)%z(%Z+)%z(%Z+)$') end - local i = ui.filteredlist(_L['Select Snippet'], - {_L['Trigger'], _L['Scope'], _L['Snippet Text']}, - t, true, '--output-column', '2', - CURSES and {'--width', ui.size[1] - 2} or '') - if i then M._insert(t[(i + 1) * 3]) end + local button, i = ui.dialogs.filteredlist{ + title = _L['Select Snippet'], + columns = {_L['Trigger'], _L['Scope'], _L['Snippet Text']}, items = t, + width = CURSES and ui.size[1] - 2 or nil + } + if button == 1 and i then M._insert(t[i * 3]) end end -- Table of escape sequences. |