Merge lines.love
[?]
Sep 16, 2023, 6:56 AM
34BZ5ZKNAB4XQGXOPVBZHBDYD5D3X4V6T72XZSR5LJXF4UIVSWQACDependencies
- [2]
MGJZHZC4Merge lines.love - [3]
AIHNAYF4clean up a slight jitter when drawing circles - [4]
NVSC4N4Kchange a helper slightly - [5]
2MGBV7NPbugfix: crash when using mouse wheel - [6]
4PHGNJN6assume starty can be nil in update - [7]
PXSQR2ADhide line numbers from log browser - [8]
J5NTUS2Gsource: show file being edited in window title bar - [9]
2CK5QI7Wmake love event names consistent - [10]
TLOAPLBJadd a license - [11]
3QNOKBFMbeginnings of a test harness - [12]
VOU73AK6Merge lines.love - [13]
KTZQ57HVreplace globals with args in a few functions - [14]
OI4FPFINsupport drawings in the source editor - [15]
4U4VQWNYMerge lines.love - [16]
KYNGDE2Cconsistent names in a few more places - [17]
WB6SIB7HMerge lines.love - [18]
CWQIPU7Ualways show line numbers in source editor - [19]
66X36NZNa little more prose describing manual_tests - [20]
2L5MEZV3experiment: new edit namespace - [21]
JOPVPUSAediting source code from within the app - [22]
JFFUF5ALoverride mouse state lookups in tests - [23]
BULPIBEGbeginnings of a module for the text editor - [24]
ERQKFTPVextract method - [25]
ZLJYLPOTMerge lines.love - [26]
OB5XOXVCdeemphasize the source editor - [27]
XX7G2FFJintermingle freehand line drawings with text - [28]
CEDTFKFDdelete some dead code - [29]
KMSL74GAsupport selections in the source editor - [30]
OMLASW7Kexperiment at avoiding some merge conflicts - [31]
BYKXF3YYbugfix: draw menu after everything else - [32]
L2FWWEQLsource: remember cursor position of multiple files - [33]
7VGDIPLCmore robust state validation - [34]
VHQCNMARseveral more modules - [35]
G54H3YG2get rid of all bifold text - [36]
AIBA4RWQhide cursor in log browser window - [37]
VHUNJHXBMerge lines.love - [38]
SW7BSBMJseveral bugfixes in saving/loading cursor position - [39]
B6DS4GZCMerge lines.love - [40]
RT6EV6OPdelegate update events to drawings - [41]
D2GCFTTTclean up repl functionality - [42]
AF253GHLbugfix - [43]
REAIVN7WMerge lines.love - [44]
ONHKBLLCMerge lines.love - [45]
D4B52CQ2Merge lines.love - [46]
U3MJNFUYMerge lines.love - [47]
3PSFWAILMerge lines.love - [48]
V5SYDHPQstart thinking of compute_fragments as a detail - [49]
R5QXEHUIsomebody stop me - [50]
RSZD5A7Gforgot to add json.lua - [51]
IX5YTLSVstate validation in source editor as well - [52]
3XNFQDDNMerge lines.love - [53]
73OCE2MCafter much struggle, a brute-force undo - [54]
PJEQCTBLadd state arg to Drawing.update - [55]
PTT4K4EUuse the provided args everywhere - [56]
X3CQLBTRset window title within each app - [57]
VBU5YHLRMerge lines.love - [58]
2TQUKHBCMerge lines.love - [59]
R3XGABERchunk up some long lines - [60]
2CTN2IEFMerge lines.love - [61]
JZR3QMTNMerge lines.love - [62]
ORKN6EOBMerge lines.love - [63]
T4FRZSYLdelete an ancient, unused file - [64]
OGUV4HSAremove some memory leaks from rendered fragments - [65]
OTIBCAUJlove2d scaffold - [66]
P5QNVXSNdrop final mention of state global beyond main.lua - [67]
3OTESDW6move drawing.starty into line cache - [68]
MD3W5IRAnew fork: rip out drawing support - [69]
TXI6GSQDsome minor cleanup - [70]
LIKTH6HMupdate stale source X-( - [71]
LNUHQOGHstart passing in Editor_state explicitly - [72]
AYX33NBCMerge lines.love - [73]
MU2HIRR6Merge lines.love - [74]
ZTK4QTZTextract a couple of functions - [75]
ATQO62TFMerge lines.love - [76]
KWIVKQQ7Merge lines.love - [77]
NYQ7HD4Dmove - [78]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [79]
VP5KC4XZMerge lines.love - [80]
2344TV56Merge lines.love - [81]
LDFXFRUObring a few things in sync between run and source - [82]
4VQGE7RAnew test - [83]
B4JEWKWIhide editor cursor while in file navigator - [84]
W6XUYQKPsource: show files in MRU order - [85]
4SR3Z4Y3document the version of LÖVE I've been using - [86]
TVCPXAAUrename - [87]
SGMA5JLEsave the list of tests in repo - [88]
BLWAYPKVextract a module - [89]
KKMFQDR4editing source code from within the app - [90]
LWPFEZBIMerge lines.love - [91]
RU4HIK43Merge lines.love - [92]
FS2ITYYHrecord a known issue - [93]
GX236KZGRevert "deemphasize the source editor" - [94]
VXORMHMEdelete experimental REPL - [95]
CE4LZV4Tdrop last couple of manual tests - [96]
K2X6G75Zstart writing some tests for drawings - [97]
4YDBYBA4clean up memory leak experiments - [98]
GFXWHTE6mouse wheel support - [99]
N2NUGNN4include a brief reference enabling many useful apps - [100]
6LJZN727handle chords - [101]
AKZWDWIAMerge lines.love - [102]
LXTTOB33extract a couple of files - [103]
GZ5WULJVswitch source side to new screen-line-based render - [104]
K74U4BAUMerge lines.love - [105]
5SM6DRHKport inscript's bugfix to source editor - [106]
ED4Z6ORCcleaner API for file-system access - [107]
AVTNUQYRbasic test-enabled framework - [108]
QQBP3G6Wreturn height of editor widget after drawing
Change contents
- file deletion: source_text.lua source_text.lua
if show_line_numbers thenApp.color(Line_number_color)love.graphics.print(line_index, State.left-Line_number_width*App.width('m')+10,y)endinitialize_color()function Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)local line = State.lines[line_index]local line_cache = State.line_cache[line_index]line_cache.starty = yline_cache.startpos = startpos - file deletion: source_edit.lua source_edit.lua
left = math.floor(left), -- left margin for text; line numbers go to the left of thisy, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)edit.put_cursor_on_next_text_line(State)edit.put_cursor_on_next_text_line(State)for i=1,math.floor(-dy) doText.down(State)endfor i=1,math.floor(dy) doText.up(State)end--? print('=> y', y)elseif line.mode == 'drawing' theny = y+Drawing_padding_topDrawing.draw(State, line_index, y)y = y + Drawing.pixels(line.h, State.width) + Drawing_padding_bottomelseprint(line.mode)assert(false)local buttonx = State.left-Margin_left+4if show_line_numbers thenbuttonx = 4 -- HACK: position draw buttons at a fixed x on screenendbutton(State, 'draw', {x=buttonx, y=y+4, w=12,h=12, color={1,1,0},icon = icon.insert_drawing,onpress1 = function()Drawing.before = snapshot(State, line_index-1, line_index)table.insert(State.lines, line_index, {mode='drawing', y=y, h=256/2, points={}, shapes={}, pending={}})table.insert(State.line_cache, line_index, {})if State.cursor1.line >= line_index thenState.cursor1.line = State.cursor1.line+1endschedule_save(State)record_undo_event(State, {before=Drawing.before, after=snapshot(State, line_index-1, line_index+1)})end,})function edit.draw(State, hide_cursor, show_line_numbers)State.button_handlers = {}App.color(Text_color)right = math.floor(right),if State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1endendfunction edit.put_cursor_on_next_text_line(State)while true doif State.cursor1.line >= #State.lines thenbreakendedit.put_cursor_on_next_text_line(State)endendfunction edit.invalid1(State, loc1) - file deletion: source.lua source.lua
edit.draw(Editor_state, --[[hide cursor?]] Show_file_navigator, --[[show line numbers]] true)if Show_log_browser_side then-- dividerApp.color(Divider_color)love.graphics.rectangle('fill', App.screen.width/2-1,Menu_status_bar_height, 3,App.screen.height)--love.window.setTitle('lines.love - source - '..Editor_state.filename) - file deletion: commands.lua commands.lua
source.switch_to_file(s..'.lua')love.window.setTitle('lines.love - source - '..Editor_state.filename)reset_file_navigator() - replacement in source_text.lua at line 6
function Text.draw(State, line_index, y, startpos, hide_cursor)function Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers) - replacement in source_text.lua at line 15
App.color(Line_number_color)love.graphics.print(line_index, State.left-Line_number_width*App.width('m')+10,y)if show_line_numbers thenApp.color(Line_number_color)love.graphics.print(line_index, State.left-Line_number_width*App.width('m')+10,y)end - replacement in source_edit.lua at line 92
left = math.floor(left),left = math.floor(left), -- left margin for text; line numbers go to the left of this - replacement in source_edit.lua at line 118
edit.put_cursor_on_first_text_line(State)edit.put_cursor_on_next_text_line(State) - replacement in source_edit.lua at line 134[9.714]→[9.714:765](∅→∅),[9.765]→[9.18307:18378](∅→∅),[9.18307]→[9.18307:18378](∅→∅),[9.18378]→[9.766:804](∅→∅),[9.804]→[9.18407:18427](∅→∅),[9.18407]→[9.18407:18427](∅→∅)
function edit.put_cursor_on_first_text_line(State)for i,line in ipairs(State.lines) doif line.mode == 'text' thenState.cursor1 = {line=i, pos=1}breakendfunction edit.put_cursor_on_next_text_line(State)while true doif State.cursor1.line >= #State.lines thenbreakendif State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1 - replacement in source_edit.lua at line 147
function edit.draw(State, hide_cursor)function edit.draw(State, hide_cursor, show_line_numbers) - replacement in source_edit.lua at line 176
button(State, 'draw', {x=4, y=y+4, w=12,h=12, color={1,1,0},local buttonx = State.left-Margin_left+4if show_line_numbers thenbuttonx = 4 -- HACK: position draw buttons at a fixed x on screenendbutton(State, 'draw', {x=buttonx, y=y+4, w=12,h=12, color={1,1,0}, - replacement in source_edit.lua at line 194
y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, hide_cursor)y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers) - edit in source_edit.lua at line 340
edit.put_cursor_on_next_text_line(State) - edit in source_edit.lua at line 346
edit.put_cursor_on_next_text_line(State) - replacement in source.lua at line 77
love.window.setTitle('text.love - source')love.window.setTitle('text.love - source - '..Editor_state.filename) - replacement in source.lua at line 240
edit.draw(Editor_state, --[[hide cursor?]] Show_file_navigator)edit.draw(Editor_state, --[[hide cursor?]] Show_file_navigator, --[[show line numbers]] true) - edit in log_browser.lua at line 38
line.filename = guess_source(line.filename) - edit in log_browser.lua at line 75
endfunction guess_source(filename)local possible_source = filename:gsub('%.lua$', '%.splua')if file_exists(possible_source) thenreturn possible_sourceelsereturn filenameend - edit in edit.lua at line 80
edit.put_cursor_on_next_text_line(State) - resurrect zombie in edit.lua at line 80
endendfunction edit.invalid1(State, loc1) - resolve order conflict in edit.lua at line 80
- resurrect zombie in edit.lua at line 98
end - edit in edit.lua at line 100
function edit.put_cursor_on_next_text_line(State)while true doif State.cursor1.line >= #State.lines thenbreakif State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1end - edit in drawing.lua at line 194
local r = round(geom.dist(center.x, center.y, mx, my)) - replacement in drawing.lua at line 196
love.graphics.circle('line', cx,cy, geom.dist(cx,cy, App.mouse_x(),App.mouse_y()))love.graphics.circle('line', cx,cy, Drawing.pixels(r, width)) - edit in drawing.lua at line 221
local r = round(geom.dist(center.x, center.y, mx, my))love.graphics.circle('line', cx,cy, Drawing.pixels(r, width)) - resolve order conflict in drawing.lua at line 221
- edit in drawing.lua at line 252
if line_cache.starty == nil then-- some event cleared starty just this frame-- draw in this frame will soon set starty-- just skip this framereturnend - edit in drawing.lua at line 301
if line_cache.starty == nil then-- some event cleared starty just this frame-- draw in this frame will soon set starty-- just skip this framereturnend - resolve order conflict in drawing.lua at line 301
- replacement in commands.lua at line 132
local candidate = guess_source(s..'.lua')source.switch_to_file(candidate)source.switch_to_file(s..'.lua')love.window.setTitle('lines.love - source - '..Editor_state.filename)