save the list of open files across restart
Dependencies
- [2]
6MQCFHXMremember when someone deletes an example - [3]
VEAVIL4Xresize handler - [4]
VUF2SX7Bimplement carousel buttons for inserting/switching current pane - [5]
OOSUBWKXsubject people to a tutorial - [6]
VAVXKWZVaggregate global state inside a 'pane' object - [7]
5RUFNRJOstart of the visual skeleton - [8]
MJ6KKFVTgive example panes a name - [*]
R5QXEHUIsomebody stop me - [*]
YV2GBDNWpreserve settings across restart - [*]
ZM7NOBRMnew fork: carousel shell
Change contents
- file addition: 0146-load_panes_from_previous_session[10.2]
load_panes_from_previous_session = function()if Initial_load_filenames == nil then return endfor _,filename in ipairs(Initial_load_filenames) dotable.insert(Panes, new_pane())Current_pane_index = #PanesCurrent_pane = Panes[Current_pane_index]Current_pane.filename = filenameone_time_load()endend - file addition: 0145-Initial_load_filenames[10.2]
-- List of filenames loaded from settings that on.initialize will load into Panes.-- It's particularly unfortunate that this is a global.Initial_load_filenames = nil - file addition: 0144-filenames_from_all_panes[10.2]
filenames_from_all_panes = function()local result = {}for _,pane in ipairs(Panes) doif pane.filename thentable.insert(result, pane.filename)endendreturn resultend - edit in 0099-on.load_settings at line 11
Initial_load_filenames = settings.loaded_filenames - edit in 0098-on.save_settings at line 7
loaded_filenames = filenames_from_all_panes(), - replacement in 0011-on.initialize at line 11
table.insert(Panes, new_pane())load_panes_from_previous_session()if #Panes == 0 thentable.insert(Panes, new_pane())end