diff --git a/commands.lua b/commands.lua index 9cd8177..c3ad4f8 100644 --- a/commands.lua +++ b/commands.lua @@ -997,9 +997,7 @@ function command.reload_all() table.insert(column_names, column.name) end Surface = {} - cache_errors = Cache['errors'] Cache = {} - Cache['errors'] = cache_errors local old_viewport = {x=Display_settings.x, y=Display_settings.y} local old_cursor_pane = Cursor_pane Cursor_pane = {col=0,row=1} diff --git a/errors.lua b/errors.lua index 1cdd484..7b42fc0 100644 --- a/errors.lua +++ b/errors.lua @@ -1,7 +1,7 @@ function add_error(err) print(err) - table.insert(Cache['errors'].lines, {mode='text', data=err}) - table.insert(Cache['errors'].line_cache, {}) + table.insert(Error_log.lines, {mode='text', data=err}) + table.insert(Error_log.line_cache, {}) Current_error = err Current_error_time = App.getTime() Current_error_text = App.newText(love.graphics.getFont(), err) diff --git a/run.lua b/run.lua index cf1a909..2f41fd2 100644 --- a/run.lua +++ b/run.lua @@ -49,8 +49,6 @@ function run.initialize_globals() -- share data between such aliases: -- line contents when panes are not editable (editable panes can diverge) -- links between files (never in Surface, can never diverge between panes) - -- One constraint on Cache: it must always include a properly saved 'errors' - -- element (created further down in this function). Cache = {} -- LÖVE renders N frames per second like any game engine, but we don't @@ -123,8 +121,8 @@ function run.initialize_globals() -- blinking cursor Cursor_time = 0 - -- errors are not persisted, and stored in Cache['errors'] - Cache['errors'] = {id='errors', filename=Directory..'errors', left=0, right=Display_settings.column_width, lines={}, line_cache={}} + -- a read-only buffer for errors + Error_log = {id='errors', filename=Directory..'errors', left=0, right=Display_settings.column_width, lines={}, line_cache={}} Current_error = nil Current_error_text = nil Current_error_time = nil