Merge text.love
[?]
Mar 17, 2023, 6:15 PM
R56CKHYZLUOTRK42EKTFC4KUUYI76PREFVFE2YKCZCODFKIJKAQQCDependencies
- [2]
HOUCPP7PMerge text.love - [3]
TPGGOVD4Merge text.love - [4]
U3MJNFUYMerge lines.love - [5]
DCO5BQWVMerge lines.love - [6]
XX7G2FFJintermingle freehand line drawings with text - [7]
36Z442IVback to commit 8123959e52f without code editing - [8]
RSZD5A7Gforgot to add json.lua - [9]
C3GUE45IMerge text.love - [10]
STYH5IVGMerge text.love - [11]
ECBDENZ4Merge text.love - [12]
2L5MEZV3experiment: new edit namespace - [13]
CE4LZV4Tdrop last couple of manual tests - [14]
BLWAYPKVextract a module - [15]
LNUHQOGHstart passing in Editor_state explicitly - [16]
GUOQRUL7Merge lines.love - [17]
3PSFWAILMerge lines.love - [18]
K74U4BAUMerge lines.love - [19]
OTIBCAUJlove2d scaffold - [20]
DUHVCYW5Merge text.love - [21]
JOPVPUSAediting source code from within the app - [22]
OGUV4HSAremove some memory leaks from rendered fragments - [23]
ZTZOO2OQMerge lines.love - [24]
66X36NZNa little more prose describing manual_tests - [25]
A4BSGS2CMerge lines.love - [26]
ETXNVRPTMerge lines.love - [27]
D76MS2G2Merge lines.love - [28]
R5QXEHUIsomebody stop me - [29]
4SR3Z4Y3document the version of LÖVE I've been using - [30]
73OCE2MCafter much struggle, a brute-force undo - [31]
4YDBYBA4clean up memory leak experiments - [32]
T4FRZSYLdelete an ancient, unused file - [33]
LXTTOB33extract a couple of files - [34]
VHUNJHXBMerge lines.love - [35]
TLOAPLBJadd a license - [36]
MD3W5IRAnew fork: rip out drawing support - [37]
W5H5YI6SMerge text.love - [38]
VXORMHMEdelete experimental REPL - [39]
6LJZN727handle chords - [40]
D2GCFTTTclean up repl functionality - [41]
UAYCSFSKMerge text.love - [42]
FS2ITYYHrecord a known issue - [43]
P3K7UH5CMerge lines.love - [44]
QS3YLNKZMerge lines.love - [45]
7VGDIPLCmore robust state validation - [46]
BULPIBEGbeginnings of a module for the text editor - [47]
ORKN6EOBMerge lines.love - [48]
EX43CDDIMerge text.love - [49]
B4FAIVRAMerge lines.love - [50]
KKMFQDR4editing source code from within the app - [51]
VP5KC4XZMerge lines.love - [52]
KMSL74GAsupport selections in the source editor - [53]
AVTNUQYRbasic test-enabled framework - [54]
TVCPXAAUrename - [55]
VBU5YHLRMerge lines.love - [56]
AYX33NBCMerge lines.love - [57]
VHQCNMARseveral more modules - [58]
2CTN2IEFMerge lines.love - [59]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [60]
3QNOKBFMbeginnings of a test harness - [61]
K2X6G75Zstart writing some tests for drawings
Change contents
- file deletion: source_edit.lua source_edit.lua
State.cursor1 = {line=i, pos=1}breakendendendfunction edit.check_locs(State)-- if State is inconsistent (i.e. file changed by some other program),-- throw away all cursor state entirelyif edit.invalid1(State, State.screen_top1)or edit.invalid1(State, State.cursor1)or not edit.cursor_on_text(State)or not Text.le1(State.screen_top1, State.cursor1) thenState.screen_top1 = {line=1, pos=1}edit.put_cursor_on_first_text_line(State)endendfunction edit.invalid1(State, loc1)return loc1.line > #State.linesor loc1.pos > #State.lines[loc1.line].dataendfunction edit.cursor_on_text(State)return State.cursor1.line <= #State.linesand State.lines[State.cursor1.line].mode == 'text'endfunction edit.put_cursor_on_first_text_line(State)for i,line in ipairs(State.lines) doif line.mode == 'text' then - file deletion: source.lua source.lua
edit.check_locs(Editor_state)-- We currently start out with side B collapsed.-- Other options:-- * save all expanded state by line-- * expand all if any location is in side Bif Editor_state.cursor1.line > #Editor_state.lines thenEditor_state.cursor1 = {line=1, pos=1}endif Editor_state.screen_top1.line > #Editor_state.lines thenEditor_state.screen_top1 = {line=1, pos=1}endedit.eradicate_locations_after_the_fold(Editor_state)if rawget(_G, 'jit') thenjit.off()jit.flush()endendfunction source.load_settings()local settings = Settings.sourcelove.graphics.setFont(love.graphics.newFont(settings.font_height))-- maximize window to determine maximum allowable dimensions - file deletion: run.lua run.lua
edit.check_locs(Editor_state)love.window.setTitle('text.love - '..Editor_state.filename)endfunction run.draw()edit.draw(Editor_state)endfunction run.update(dt)Cursor_time = Cursor_time + dtedit.update(Editor_state, dt)endfunction run.quit()edit.quit(Editor_state)endfunction run.settings()edit.check_locs(Editor_state)love.window.setTitle('text.love - '..Editor_state.filename)if #arg > 1 thenprint('ignoring commandline args after '..arg[1])endif rawget(_G, 'jit') thenjit.off()jit.flush()endendfunction run.load_settings()love.graphics.setFont(love.graphics.newFont(Settings.font_height)) - edit in main.lua at line 55
edit.check_locs(Editor_state) - edit in main.lua at line 133
edit.check_locs(Editor_state) - resurrect zombie in edit.lua at line 87[5.371]→[5.371:472](∅→∅),[5.371]→[5.371:472](∅→∅),[5.472]→[4.919:955](∅→∅),[5.472]→[4.919:955](∅→∅),[4.955]→[5.518:648](∅→∅),[5.518]→[5.518:648](∅→∅),[5.518]→[5.518:648](∅→∅),[5.790]→[5.790:795](∅→∅),[5.790]→[5.790:795](∅→∅)
or not Text.le1(State.screen_top1, State.cursor1) thenState.screen_top1 = {line=1, pos=1}State.cursor1 = {line=1, pos=1}endendfunction edit.invalid1(State, loc1)return loc1.line > #State.linesor loc1.pos > #State.lines[loc1.line].dataend