From 3aa3f9f30142ea40dc20cb0aba462fdc5ac0da64 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 14 Oct 2010 21:09:46 -0400 Subject: Code formatting changes. --- modules/textadept/snapopen.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'modules/textadept/snapopen.lua') diff --git a/modules/textadept/snapopen.lua b/modules/textadept/snapopen.lua index da4581d3..62320835 100644 --- a/modules/textadept/snapopen.lua +++ b/modules/textadept/snapopen.lua @@ -15,13 +15,13 @@ module('_m.textadept.snapopen', package.seeall) -- -- ## Examples -- --- local snapopen = _m.textadept.snapopen +-- local snapopen = _m.textadept.snapopen.open -- -- -- Show all files in PATHS. -- snapopen() -- -- -- Show all files in the current file's directory. --- snapopen(buffer.filename:match('^.+[/\\]'), nil, true) +-- snapopen(buffer.filename:match('^(.+)[/\\]'), nil, true) -- -- -- Show all Lua files in PATHS. -- snapopen(nil, '!%.lua$') @@ -110,16 +110,15 @@ function open(paths, filter, exclusive, depth) gui.dialog('ok-msgbox', '--title', locale.M_SNAPOPEN_LIMIT_EXCEEDED_TITLE, '--informative-text', - string.format(locale.M_SNAPOPEN_LIMIT_EXCEEDED_TEXT, MAX, MAX)) + string.format(locale.M_SNAPOPEN_LIMIT_EXCEEDED_TEXT, MAX, MAX)) end - local out = - gui.dialog('filteredlist', - '--title', locale.IO_OPEN_TITLE, - '--button1', 'gtk-ok', - '--button2', 'gtk-cancel', - '--no-newline', - '--columns', 'File', - '--items', list) + local out = gui.dialog('filteredlist', + '--title', locale.IO_OPEN_TITLE, + '--button1', 'gtk-ok', + '--button2', 'gtk-cancel', + '--no-newline', + '--columns', 'File', + '--items', list) local response, index = out:match('^(%d+)[\r\n]+(%d+)') if response == '1' then io.open_file(list[tonumber(index) + 1]) end end -- cgit v1.2.3