Merge lines.love
[?]
Jun 8, 2023, 8:12 AM
3XNFQDDNFGTN6ZFAB47AR6Q3663WLXDYC3K5TERYUWDM6U2FNOVACDependencies
- [2]
ONHKBLLCMerge lines.love - [3]
SW7BSBMJseveral bugfixes in saving/loading cursor position - [4]
SGMA5JLEsave the list of tests in repo - [5]
4YDBYBA4clean up memory leak experiments - [6]
BLWAYPKVextract a module - [7]
N2NUGNN4include a brief reference enabling many useful apps - [8]
7VGDIPLCmore robust state validation - [9]
AVTNUQYRbasic test-enabled framework - [10]
K2X6G75Zstart writing some tests for drawings - [11]
2L5MEZV3experiment: new edit namespace - [12]
ZQDQLLCLbugfix - [13]
6LJZN727handle chords - [14]
ZLJYLPOTMerge lines.love - [15]
VXORMHMEdelete experimental REPL - [16]
U3MJNFUYMerge lines.love - [17]
BULPIBEGbeginnings of a module for the text editor - [18]
KMSL74GAsupport selections in the source editor - [19]
C3NYQP57Merge lines.love - [20]
OTIBCAUJlove2d scaffold - [21]
AF253GHLbugfix - [22]
3QNOKBFMbeginnings of a test harness - [23]
VHQCNMARseveral more modules - [24]
TVCPXAAUrename - [25]
CQYKYJJUremember window positions across restart/ctrl+e - [26]
RSZD5A7Gforgot to add json.lua - [27]
VBU5YHLRMerge lines.love - [28]
JKENJ2UGMerge lines.love - [29]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [30]
LXTTOB33extract a couple of files - [31]
4SR3Z4Y3document the version of LÖVE I've been using - [32]
2CTN2IEFMerge lines.love - [33]
DCO5BQWVMerge lines.love - [34]
44O46KDAMerge lines.love - [35]
JDZVBFEIMerge lines.love - [36]
FS2ITYYHrecord a known issue - [37]
A4BSGS2CMerge lines.love - [38]
APYPFFS3call edit rather than App callbacks in tests - [39]
ORKN6EOBMerge lines.love - [40]
VHUNJHXBMerge lines.love - [41]
TLOAPLBJadd a license - [42]
KKMFQDR4editing source code from within the app - [43]
XX7G2FFJintermingle freehand line drawings with text - [44]
MD3W5IRAnew fork: rip out drawing support - [45]
MU2HIRR6Merge lines.love - [46]
2344TV56Merge lines.love - [47]
K74U4BAUMerge lines.love - [48]
KG7YVGVRMerge lines.love - [49]
OGD5RAQKbugfix: naming points in drawings - [50]
R5QXEHUIsomebody stop me - [51]
CE4LZV4Tdrop last couple of manual tests - [52]
D2GCFTTTclean up repl functionality - [53]
3PSFWAILMerge lines.love - [54]
P3K7UH5CMerge lines.love - [55]
73OCE2MCafter much struggle, a brute-force undo - [56]
VP5KC4XZMerge lines.love - [57]
T4FRZSYLdelete an ancient, unused file - [58]
66X36NZNa little more prose describing manual_tests - [59]
ZTZOO2OQMerge lines.love - [60]
OGUV4HSAremove some memory leaks from rendered fragments - [61]
JOPVPUSAediting source code from within the app
Change contents
- file deletion: run.lua run.lua
function absolutize(path)if is_relative_path(path) thenreturn love.filesystem.getWorkingDirectory()..'/'..path -- '/' should work even on Windowsendreturn pathendfunction run.mouse_press(x,y, mouse_button)filename=absolutize(Editor_state.filename),screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1}endif #arg > 0 and Editor_state.filename ~= absolutize(arg[1]) thenEditor_state.filename = arg[1]load_from_disk(Editor_state)Text.redraw_all(Editor_state)Editor_state.screen_top1 = {line=1, pos=1}Editor_state.cursor1 = {line=1, pos=1} - replacement in run.lua at line 22
if #arg > 0 thenif #arg > 0 and Editor_state.filename ~= absolutize(arg[1]) then - edit in run.lua at line 156[4.2331]→[4.198:204](∅→∅),[4.198]→[4.198:204](∅→∅),[4.204]→[4.182391:182432](∅→∅),[4.182391]→[4.182391:182432](∅→∅),[4.182432]→[4.652:793](∅→∅)
endlocal filename = Editor_state.filenameif is_relative_path(filename) thenfilename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows - replacement in run.lua at line 161
filename=filename,filename=absolutize(Editor_state.filename), - edit in run.lua at line 166
function absolutize(path)if is_relative_path(path) thenreturn love.filesystem.getWorkingDirectory()..'/'..path -- '/' should work even on Windowsendreturn pathend - edit in edit.lua at line 76
or edit.invalid1(State, State.cursor1) - resurrect zombie in edit.lua at line 76
or edit.invalid_cursor1(State) - edit in edit.lua at line 88
end-- cursor loc in particular differs from other locs in one way:-- pos might occur just after end of linefunction edit.invalid_cursor1(State)local cursor1 = State.cursor1if cursor1.line > #State.lines then return true endlocal l = State.lines[cursor1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn cursor1.pos > #State.lines[cursor1.line].data + 1 - edit in edit.lua at line 448
end - resurrect zombie in edit.lua at line 448
end - resolve order conflict in edit.lua at line 448
- edit in edit.lua at line 449
-- cursor loc in particular differs from other locs in one way:-- pos might occur just after end of linefunction edit.invalid_cursor1(State)local cursor1 = State.cursor1if cursor1.line > #State.lines then return true endlocal l = State.lines[cursor1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn cursor1.pos > #State.lines[cursor1.line].data + 1