If it works, credit goes to Mike Acton (https://www.youtube.com/watch?v=rX0ItVEVjHc). If not, it's my fault.
3IBO5P7DVWMJM42VZL5HIFAJH55FK77K2IKPGMNI55GRXDXT4WUQC
end
-- optimizations to limit memory footprint
-- It's better to constantly load and save a few panes from disk,
-- than it is to keep an unbounded set of panes in memory.
-- Just don't forget pane._height.
function dehydrate(pane)
if pane.next_save then return end
--? print('dehydrating '..pane.id)
pane.lines = nil
pane.line_cache = nil