From 2fb60bd197071eb6c1da78e65e00aaaa374bdce1 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 25 Mar 2013 01:48:47 -0400 Subject: Added lfs.dir_foreach() for allowing Find in Files to have a filter. Also moved snapopen module into core as io.snapopen(). --- modules/textadept/keys.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/textadept/keys.lua') diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 2951c2b3..a11f09b4 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -224,9 +224,7 @@ M.utils = { end, select_command = function() _M.textadept.menu.select_command() end, snapopen_filedir = function() - if buffer.filename then - _M.textadept.snapopen.open(buffer.filename:match('^(.+)[/\\]')) - end + if buffer.filename then io.snapopen(buffer.filename:match('^(.+)[/\\]')) end end, show_style = function() local buffer = buffer @@ -494,8 +492,8 @@ keys.f2 = m_bookmarks.goto_next keys[not NCURSES and 'sf2' or 'f3'] = m_bookmarks.goto_prev keys[not NCURSES and 'af2' or 'f4'] = m_bookmarks.goto_bookmark -- Snapopen. -keys[not OSX and 'cu' or 'mu'] = {m_textadept.snapopen.open, _USERHOME} --- TODO: {m_textadept.snapopen.open, _HOME} +keys[not OSX and 'cu' or 'mu'] = {io.snapopen, _USERHOME} +-- TODO: {io.snapopen, _HOME} keys[not OSX and (not NCURSES and 'caO' or 'mO') or 'cmO'] = utils.snapopen_filedir if not NCURSES then keys[not OSX and 'ci' or 'mi'] = utils.show_style end -- cgit v1.2.3