start loading settings as applicable
[?]
Jul 1, 2022, 5:46 AM
YGCT2D2ORMLTBHANLGHZV3EBGGHD7ZK55UAM7HF2AVSHDXAAKK5QCDependencies
- [2]
M6TH7VSZrip out notion of Line_width - [3]
QGO66DNKinitialize screen width to something reasonable - [4]
AVQ5MC5Dfinish uppercasing all globals - [5]
OYXDYPGSget rid of debug variables - [6]
YKRF5V3Zstarting to load/save - [7]
QCQHLMSTalways have a filename - [8]
XSLCFVFH. - [9]
UWNHC4AAredo y computations - [10]
OTIBCAUJlove2d scaffold - [11]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [12]
2RXZ3PGObeginning of a new approach to scroll+wrap - [13]
AJB4LFRBtry to maintain a reasonable line width - [14]
4VKEE43Zbugfix - [15]
3TTAYXPPcleanup - [16]
VO3GEIRWuse app name in window title - [17]
Z4KNS42Nto open a file without a terminal, drag it on! - [18]
G3VLJLDHuse the background color - [19]
ZZ2B5RPQextract variables for drawing padding - [20]
PGZJ6NATensure Filename is writable when opened outside a terminal - [21]
DLQMM265scroll past first page - [22]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [23]
YTSPVDZHfirst successful pagedown test, first bug found by test - [24]
MHOUX5JFexperiment: turn off JIT - [25]
AVTNUQYRbasic test-enabled framework - [26]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [27]
PESSMQBJno, make sure to compute line width after screen dimensions - [28]
MGOQ5XAVstart uppercasing globals - [29]
46ASCE5Kfirst commandline arg: window dimensions - [30]
B3IWYWSRdelete another arg that can be deduced - [31]
HOSPP2ANcrisp font rendering - [32]
RF5ALVNYallow the window to be resized - [33]
WQOSZSUEwarn on unused commandline args - [34]
73OCE2MCafter much struggle, a brute-force undo - [35]
M6JI7UJ7obsolete comment - [36]
YJGADSGKdelete unused arg - [37]
IZZVOCLBconfirm that we have access to all of the love API - [38]
AD34IX2Zcouple more tests - [39]
MYC7XR5Qbugfix: lines that aren't drawn from the start - [40]
O6T3TPXDbugfix: position cursor up top when loading file - [41]
R6GUSTBYdefault font size and line-height - [42]
HFI2YR2Crip out geometry commandline arg - [43]
W4UVZETR2 regressions: - [44]
NEXUNNCFextract a function - [*]
K464QQR4more defensive resize handling - [*]
DHCLUDCW.
Change contents
- replacement in main.lua at line 105
initialize_font_settings(20)love.graphics.setBackgroundColor(1,1,1) - replacement in main.lua at line 107
initialize_window_geometry()love.graphics.setBackgroundColor(1,1,1)if love.filesystem.getInfo('config') thenload_settings()elseload_defaults()end - replacement in main.lua at line 115[4.631]→[4.157:163](∅→∅),[4.157]→[4.157:163](∅→∅),[4.163]→[4.632:667](∅→∅),[4.667]→[4.112:145](∅→∅),[4.112]→[4.112:145](∅→∅),[4.145]→[4.398:430](∅→∅),[4.398]→[4.398:430](∅→∅),[4.430]→[4.9199:9222](∅→∅),[4.9222]→[4.3:15](∅→∅),[4.690]→[4.3:15](∅→∅)
endLines = load_from_disk(Filename)for i,line in ipairs(Lines) doif line.mode == 'text' thenCursor1.line = ibreakLines = load_from_disk(Filename)Screen_top1 = {line=1, pos=1}Cursor1 = {line=1, pos=1}for i,line in ipairs(Lines) doif line.mode == 'text' thenCursor1.line = ibreakendendelseLines = load_from_disk(Filename)if Lines[Cursor1.line].mode ~= 'text' thenfor i,line in ipairs(Lines) doif line.mode == 'text' thenCursor1.line = ibreakendend - replacement in main.lua at line 145
end -- App.initializeendfunction load_settings()local settings = json.decode(love.filesystem.read('config'))love.window.setPosition(settings.x, settings.y, settings.displayindex)App.screen.width, App.screen.height = settings.width, settings.heightlove.window.setMode(App.screen.width, App.screen.height)Filename = settings.filenameinitialize_font_settings(settings.font_height)Screen_top1 = settings.screen_topCursor1 = settings.cursorendfunction load_defaults()initialize_font_settings(20)initialize_window_geometry()end - edit in main.lua at line 215[46.261][47.5]
--? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos) - edit in main.lua at line 254
--? print('text') - edit in main.lua at line 259
--? print('text.draw', y, line_index)