Merge text.love
[?]
May 15, 2023, 12:34 AM
IGBTDA6YWCM6SRQCH5JL4GJLQDKI5JCG2QA7GF7WR24SLWSCSXEACDependencies
- [2]
YDUIKWSFMerge text.love - [3]
MVFQNLLIMerge text.love - [4]
2344TV56Merge lines.love - [5]
RSZD5A7Gforgot to add json.lua - [6]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [7]
BLWAYPKVextract a module - [8]
66X36NZNa little more prose describing manual_tests - [9]
MD3W5IRAnew fork: rip out drawing support - [10]
ZJFSVE47Merge text.love - [11]
TVCPXAAUrename - [12]
4SR3Z4Y3document the version of LÖVE I've been using - [13]
BULPIBEGbeginnings of a module for the text editor - [14]
A4BSGS2CMerge lines.love - [15]
R5QXEHUIsomebody stop me - [16]
RAXUQQ6ZMerge lines.love - [17]
VHQCNMARseveral more modules - [18]
VHUNJHXBMerge lines.love - [19]
O3WZWLYCMerge text.love - [20]
73OCE2MCafter much struggle, a brute-force undo - [21]
EX43CDDIMerge text.love - [22]
FS2ITYYHrecord a known issue - [23]
LXTTOB33extract a couple of files - [24]
VP5KC4XZMerge lines.love - [25]
VBU5YHLRMerge lines.love - [26]
2JBAEQHUMerge lines.love - [27]
N2NUGNN4include a brief reference enabling many useful apps - [28]
KMSL74GAsupport selections in the source editor - [29]
CE4LZV4Tdrop last couple of manual tests - [30]
ORKN6EOBMerge lines.love - [31]
ZTZOO2OQMerge lines.love - [32]
K74U4BAUMerge lines.love - [33]
36Z442IVback to commit 8123959e52f without code editing - [34]
D2GCFTTTclean up repl functionality - [35]
K2X6G75Zstart writing some tests for drawings - [36]
2L5MEZV3experiment: new edit namespace - [37]
ZLJYLPOTMerge lines.love - [38]
3QNOKBFMbeginnings of a test harness - [39]
4YDBYBA4clean up memory leak experiments - [40]
2CTN2IEFMerge lines.love - [41]
T4FRZSYLdelete an ancient, unused file - [42]
UAYCSFSKMerge text.love - [43]
KWIVKQQ7Merge lines.love - [44]
VXORMHMEdelete experimental REPL - [45]
2CFLXLIEMerge text.love - [46]
AVTNUQYRbasic test-enabled framework - [47]
TLOAPLBJadd a license - [48]
2TQUKHBCMerge lines.love - [49]
JZR3QMTNMerge lines.love - [50]
PJ5PQAQErecord support for multiple versions - [51]
OGUV4HSAremove some memory leaks from rendered fragments - [52]
OTIBCAUJlove2d scaffold - [53]
6LJZN727handle chords - [54]
23KRQC4YMerge lines.love - [55]
ECBDENZ4Merge text.love - [56]
QD4LOFQRMerge text.love - [57]
Q6RXCILQMerge text.love - [58]
KKMFQDR4editing source code from within the app - [59]
XX7G2FFJintermingle freehand line drawings with text - [60]
3PSFWAILMerge lines.love - [61]
JOPVPUSAediting source code from within the app
Change contents
- file deletion: source_text.lua source_text.lua
return App.width(line.data:sub(soff, loff-1)), App.width(line.data:sub(soff, hoff))assert(State.cursor1.pos)if Text.cursor_at_final_screen_line(State) then-- line is done, skip to next text line--? print('cursor at final screen line of its line')end - file deletion: source.lua source.lua
log_browser.draw(Log_browser_state, --[[hide_cursor]] Focus ~= 'log_browser')end - file deletion: log_browser.lua log_browser.lua
Text.draw(State, line_index, y, --[[startpos]] 1, hide_cursor)State.left,State.right = old_left,old_rightelseheight = log_render[line.data.name](line.data, xleft, y, xright-xleft)endendif App.mouse_x() > Log_browser_state.left and line_index == mouse_line_index thenApp.color(Cursor_line_background_color)love.graphics.rectangle('fill', xleft,y, xright-xleft, height)endy = y + heightendendendfunction render_stack_left_margin(State, line_index, line, y)if line.section_stack == nil then-- assertion messagefor k,v in pairs(line) doprint(k)endendApp.color(Section_border_color)for i=1,#line.section_stack dolocal x = State.left + (i-1)*Section_border_padding_horizontallove.graphics.line(x,y, x,y+log_browser.height(State, line_index))if y < 30 thenlove.graphics.print(line.section_stack[i].name, x+State.font_height+5, y+5, --[[vertically]] math.pi/2)endif y > App.screen.height-log_browser.height(State, line_index) thenfunction log_browser.draw(State, hide_cursor)assert(#State.lines == #State.line_cache)local mouse_line_index = log_browser.line_index(State, App.mouse_x(), App.mouse_y())local y = State.topfor line_index = State.screen_top1.line,#State.lines doApp.color(Text_color)local line = State.lines[line_index]if y + State.line_height > App.screen.height then break endlocal height = State.line_heightif should_show(line) thenlocal xleft = render_stack_left_margin(State, line_index, line, y)local xright = render_stack_right_margin(State, line_index, line, y)if line.section_name thenApp.color(Section_border_color)