This is commit af7fba3263 along with all patches to it.
The experiment was largely a success so far. However, I saw a bug that was just strange enough to question whether this is too radical a hatchet.
As I recall, I grabbed a pane and then clicked on the surface. And I got this error:
Error edit.lua:219: bad argument #1 to 'ipairs' (table expected, got nil)
Traceback [love "callbacks.lua"]:228: in function 'handler' [C]: in function 'ipairs' edit.lua:219: in function 'mouse_pressed' run.lua:712: in function 'mouse_pressed_in_normal_mode' run.lua:677: in function 'mouse_pressed' main.lua:242: in function <main.lua:239> app.lua:31: in function <app.lua:22> [C]: in function 'xpcall'
Doesn't matter. I don't need a long tail of bugs in my software when nobody would notice just truncating the number of columns.
With this, pensieve no longer has an infinite surface. Back when I conceived of an infinite surface I didn't have search. But with (even just the current hokey iteration of) search it's easy to bring back a column. And the spatial metaphor seems pretty conclusively not working. I never have a sense of the big picture of the surface, and moving things in radical ways never feels choppy. That might be a good idea, but it's not for this product.
Thanks Jack Rusher for pushing back on the need for this idea. That got me to question it even though "everything seems to be working."
Let's see now if pensieve ever seems sluggish again.
PUXEQW47JOGU3PGAVPPXEACNEOXMYNPIHRQ3BCZ4VSWXR5YVVQNAC
PK4PSKQFIIG3ALUOI2SKMWUKW5CI5QEZLFNDPJH6Q5MWGLVCBOVQC
3V4VGNKYNGVO3KC4VVUCKX6BBV3VNOESX3CFEGHBPIJFXUEZ6BVQC
JMUE7GSN6QDQZ6NDRB55MRJMKJN6LBD6MVQPKROYPDOIXM7I3XNQC
AF6OSRA4UFFQTOWGOAEPQ2DQDPTKTU2MB7JXOGXOJADDB5SFJWBAC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
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
if pane == Grab_pane then return end
--? print('dehydrating '..pane.id)
pane.lines = nil
pane.line_cache = nil
end
function hydrate(pane)
if pane.lines then return end
--? print(' hydrating '..pane.id)
load_from_disk(pane)
Text.redraw_all(pane)