commit 98d70859cd reintroduced a regression: the bug fixed in commit ed1dadd044. This commit doesn't actually fix anything, but is an admission that my approach so far is shit, and needs extensive surgery.
Major/recurring issues I'm currently tracking: links at bottom not consistently printing spacing between panes not always correct
panning causes title to appear only when some text is printed
panning causes text to appear
pane.top discontinuously moves in some columns as you pan
B22JHH4W75CLJTHZWAHJZWYL3L7IN4MSIJSR5CCCCXYWYA27TRNQC
S5GFPVFISOS263IDSO467XMSDIL2KKVMWJEAPLQQJRE6WA6VNVTAC
3RHJPDTUFMPNIRA7YFSSSGKEHJL6KPBKQU3WI6DJOYYTVBPWVR5AC
E6SVERDK45NPJPKYUGZDAEAO4QACMZPC4ZGXXASVHOHE2GAMBL3AC
S4TFD5YYEMH24RVOO5THEOW7WUP4FSICR4UYABSRE2UKXYCNN4DQC
S2MBCK33FR5HZ52XAJ322XPV4GKRLCNZFW7QKIJUZPONFKAWHONQC
HOCOBJOG6HPMYXPYQRWGVLT3L2ZF6OEKAQSQECRFIG6NVN2DGK2AC
34DW7FQEOLQNZFSRFLDDMMBKCUF2L2VBA7SS2ON5UHAWTHPNUMGAC
SKGUJVTZNEQACCEFQDLSDHJGSVLR5YOENPYFSVIETY7KHJKESGAAC
Y3BILPNQMMALHDIZFRSTM6IDUAKQOFD2AK3G3LLKO2O5AT4NMC4QC
A2NKTJZLXUI7G4QNLGG35D2FL55HBFEJLDMZ62J5IFO3RF6CG2TAC
OSDKHQQ25NJUL2GIVB3LOAYTPA2QPQ6NXTZMW5DIX2LLRLYHD7HAC
J3ER7DFO2TXYUMJAXZUFEHQNLFDNIXSYDTE7HEFGQ2RYB3A6RFPAC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
CZY3IDERLI6MTKKKMX6QLLERSPM2ZJ57NGQRKILJBM7S5PYPQ3XAC
R6GUSTBY5ZHR7E46DSIDQDNZDJI6QMZQDC7RPQMQWLGWQKXU6HVQC
7AKT7IKOP6VQW3CABAVXCEZTHYNAETV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NQY5CDYYWKFUFK3OFXU7UZCFTTMBSYDMEKIY7LUZIB5XFRTQQQC
6SEECG7ACIN6ZK72ED3DKYZKBNM5M5OMTD4M6HLNMAH376NYNAEAC
4PPQU5WW2BHKO32CY24KGQXM6GHZQCIWQYQ2JATKJWYIE3HMMX5QC
V6JHPHYNDGOBF3OKHPYJ6IQEU5PSLWNUCQBGVW4TG7TYL6OLF3QAC
ZU3HJ6NH26LFY2NWRCCRMXECNEPVR25OJNOFEK5XJ3KYFJUCKQXAC
XV52L22IDM4Y22GLHJOPWWCEXRGJVUJWXDHSFS2UQNX66CE55VJQC
-- LÖVE renders N frames per second like any game engine, but we don't
-- really need that. The only thing that animates in this app is the cursor.
--
-- Until I fix that, the architecture of this app will be to plan what to
-- draw only when something changes. That way we minimize the amount of
-- computation/power wasted on each of those frames.
Panes_to_draw = {} -- array of panes from surface
Column_headers_to_draw = {} -- strings with x coordinates
-- keep the structure of this function sync'd with refresh_pane_height and draw_normal_mode
function update_pane_bounds(options)
-- keep the structure of this function sync'd with refresh_pane_height
function plan_draw(options)
for column_index, column in ipairs(Surface) do
if should_show_column(sx) then
local sy = Padding_vertical
for pane_index, pane in ipairs(column) do
--? print('draw:', column_index, pane_index, sx,sy)
if should_show_pane(pane, sy) then
assert(pane.top) -- ensure we're in sync with update_pane_bounds
-- Panes further down will include the title in their height, but
-- the top-most pane needs a special case.
if pane_index == 1 and column[pane_index].title then
sy = sy + 5+Line_height+5
end
if pane.title and eq(pane.screen_top1, {line=1, pos=1}) then
draw_title(pane)
end
pane.cursor_y = nil
edit.draw(pane)
if pane_drew_to_bottom(pane) then
draw_links(pane)
end
if column_index == Cursor_pane.col and pane_index == Cursor_pane.row then
App.color(Cursor_pane_background_color)
if pane.editable and Surface.cursor_on_screen_check then
assert(pane.cursor_y)
Surface.cursor_on_screen_check = false
end
else
App.color(Pane_background_color)
end
love.graphics.rectangle('fill', pane.left-Margin_left,pane.top-Margin_above, pane.width+Margin_left+Margin_right, pane.bottom-pane.top+Margin_above+Margin_below)
if pane.bottom >= App.screen.height then
break
end
end
sy = sy + Margin_above + height(pane) + Margin_below + Padding_vertical
for _,pane in ipairs(Panes_to_draw) do
assert(pane.top)
if pane.title and eq(pane.screen_top1, {line=1, pos=1}) then
draw_title(pane)
end
pane.cursor_y = nil
edit.draw(pane)
if pane_drew_to_bottom(pane) then
draw_links(pane)
end
if column_index == Cursor_pane.col and pane_index == Cursor_pane.row then
App.color(Cursor_pane_background_color)
if pane.editable and Surface.cursor_on_screen_check then
assert(pane.cursor_y)
Surface.cursor_on_screen_check = false
love.graphics.rectangle('fill', sx-Display_settings.x - Margin_left, Menu_status_bar_height, Margin_left + Display_settings.column_width + Margin_right, Column_header_height)
love.graphics.rectangle('fill', header.x - Margin_left, Menu_status_bar_height, Margin_left + Display_settings.column_width + Margin_right, Column_header_height)
love.graphics.print(column.name, sx-Display_settings.x, Menu_status_bar_height+5)
sx = sx + Margin_right + Display_settings.column_width + Padding_horizontal + Margin_left
love.graphics.print(header.name, header.x, Menu_status_bar_height+5)