From ddb4b90a30b2a0ff8ef16309f96a63d84596c651 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 15 Aug 2007 22:53:59 -0400 Subject: Recent files are now tracked and a user list can be shown to open them. --- core/file_io.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core') 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,10 +3,20 @@ --- -- 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. @@ -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 --- -- cgit v1.2.3