Merge lines.love
[?]
Mar 17, 2023, 6:02 PM
U3MJNFUY4ER65BIKP4D7JGVYWFPXA55KBJYD4RH5KRRKRQXBAW5ACDependencies
- [2]
KG7YVGVRMerge lines.love - [3]
XS3PZI7GMerge lines.love - [4]
7VGDIPLCmore robust state validation - [5]
IX5YTLSVstate validation in source editor as well - [6]
VXORMHMEdelete experimental REPL - [7]
VBU5YHLRMerge lines.love - [8]
SDO4DHNUsource: load cursor position from settings - [9]
XX7G2FFJintermingle freehand line drawings with text - [10]
ERQKFTPVextract method - [11]
AOZX2G5Fsource: no commandline args - [12]
R5QXEHUIsomebody stop me - [13]
MD3W5IRAnew fork: rip out drawing support - [14]
KMSL74GAsupport selections in the source editor - [15]
OTIBCAUJlove2d scaffold - [16]
DB7HJBHJMerge lines.love - [17]
A4BSGS2CMerge lines.love - [18]
GUOQRUL7Merge lines.love - [19]
OGUV4HSAremove some memory leaks from rendered fragments - [20]
L2FWWEQLsource: remember cursor position of multiple files - [21]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [22]
4SR3Z4Y3document the version of LÖVE I've been using - [23]
RSZD5A7Gforgot to add json.lua - [24]
B4JEWKWIhide editor cursor while in file navigator - [25]
5STHSG4Uremove some duplication - [26]
HCFDBUXHfix stale comment - [27]
P3K7UH5CMerge lines.love - [28]
K74U4BAUMerge lines.love - [29]
D76MS2G2Merge lines.love - [30]
2L5MEZV3experiment: new edit namespace - [31]
ZTZOO2OQMerge lines.love - [32]
ORKN6EOBMerge lines.love - [33]
AVTNUQYRbasic test-enabled framework - [34]
BULPIBEGbeginnings of a module for the text editor - [35]
LF7BWEG4group all editor globals - [36]
VP5KC4XZMerge lines.love - [37]
A23MMLJHmigrate old settings, attempt #3 - [38]
LXTTOB33extract a couple of files - [39]
LNUHQOGHstart passing in Editor_state explicitly - [40]
66X36NZNa little more prose describing manual_tests - [41]
4KC7I3E2make colors easier to edit - [42]
TVCPXAAUrename - [43]
JOPVPUSAediting source code from within the app - [44]
DCO5BQWVMerge lines.love - [45]
EMG7SDLWbugfix: cold start - [46]
3PSFWAILMerge lines.love - [47]
VHUNJHXBMerge lines.love - [48]
ATQO62TFMerge lines.love - [49]
KKMFQDR4editing source code from within the app - [50]
4YDBYBA4clean up memory leak experiments - [51]
2CTN2IEFMerge lines.love - [52]
ZJOSQFN6bugfix: path munging on Windows - [53]
T4FRZSYLdelete an ancient, unused file - [54]
B4FAIVRAMerge lines.love - [55]
D2GCFTTTclean up repl functionality - [56]
3QNOKBFMbeginnings of a test harness - [57]
QS3YLNKZMerge lines.love - [58]
CE4LZV4Tdrop last couple of manual tests - [59]
K2X6G75Zstart writing some tests for drawings - [60]
BLWAYPKVextract a module - [61]
CQYKYJJUremember window positions across restart/ctrl+e - [62]
FS2ITYYHrecord a known issue - [63]
OI4FPFINsupport drawings in the source editor - [64]
ETXNVRPTMerge lines.love - [65]
VHQCNMARseveral more modules - [66]
TLOAPLBJadd a license - [67]
2CK5QI7Wmake love event names consistent - [68]
6LJZN727handle chords - [69]
73OCE2MCafter much struggle, a brute-force undo
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) - file deletion: run.lua run.lua
edit.check_locs(Editor_state)love.window.setTitle('lines.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('lines.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)) - replacement in source_edit.lua at line 118
function edit.fixup_cursor(State)function 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) - replacement in source_edit.lua at line 143
State.cursor1.line = iState.cursor1 = {line=i, pos=1} - edit in source.lua at line 90
edit.check_locs(Editor_state) - edit in run.lua at line 35
edit.check_locs(Editor_state) - edit in run.lua at line 112
edit.check_locs(Editor_state) - resurrect zombie in edit.lua at line 77
function 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) - edit in edit.lua at line 82
or not edit.cursor_on_text(State) - replacement in edit.lua at line 84
edit.put_cursor_on_first_text_line(State)State.cursor1 = {line=1, pos=1} - edit in edit.lua at line 91
endfunction edit.cursor_on_text(State)return State.cursor1.line <= #State.linesand State.lines[State.cursor1.line].mode == 'text' - edit in edit.lua at line 93
function edit.put_cursor_on_first_text_line(State)State.cursor1 = {line=i, pos=1}