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C
BYUKUSAY5BW66B2GQJD7XJSYM45DV3AB2VXOT6QLFD4SSKE5GYHQC
HD2HHK5EGCPCAV4CK737F554CYCF6HKDLJZFLRU2TYV2F554WITAC
5HOB5Y6ZDNJ42XMHQ7YWZTUCK4DAJRPYRECDWTKFSXZWQ4ZMMSNAC
WPM6T7ST6XD2YQD4PJ7767JJQRKV5JS6AVO6C4RXIHD4REOGTNEQC
4PPQU5WW2BHKO32CY24KGQXM6GHZQCIWQYQ2JATKJWYIE3HMMX5QC
V6JHPHYNDGOBF3OKHPYJ6IQEU5PSLWNUCQBGVW4TG7TYL6OLF3QAC
FB7L2QQW6L7X4OWANGKN5U4XFLTJ7G3OINZBQEG3ZT53FUIGKAYAC
end
function initialize_cache_if_necessary(id)
if Cache[id] then return end
--? print('init:', id)
Cache[id] = {id=id, filename=Directory..id, left=0, right=Display_settings.column_width, lines={}, line_cache={}}
load_from_disk(Cache[id])
Links[id] = load_links(id)
local pane = edit.initialize_state(0, 0, math.min(Display_settings.column_width, App.screen.width-Margin_right), Font_height, Line_height)
pane.id = 'errors'
pane.filename = Directory..pane.id
pane.lines = Cache[pane.id].lines
pane.line_cache = Cache[pane.id].line_cache -- alias since we won't edit
-- TODO: we might run into some bugs if we have multiple error panes visible
-- on the surface; unlike everything else these currently alias.
local pane = Error_log