diff options
Diffstat (limited to 'core/file_io.lua')
-rw-r--r-- | core/file_io.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index cdc09af0..c7433479 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -3,11 +3,21 @@ --- -- Provides file input/output routines for Textadept. -- Opens and saves files and sessions and reads API files. +-- +-- Events: +-- file_opened(filename) +-- file_saved_as(filename) module('textadept.io', package.seeall) local events = textadept.events --- +-- List of recently opened files. +-- @class table +-- @name recent_files +recent_files = {} + +--- -- [Local function] Opens a file or goes to its already open buffer. -- @param filename The absolute path to the file to open. local function open_helper(filename) @@ -25,6 +35,7 @@ local function open_helper(filename) buffer.filename = filename buffer:set_save_point() events.handle('file_opened', filename) + recent_files[#recent_files + 1] = filename end --- |