Merge text.love
[?]
Dec 13, 2022, 7:52 AM
THRPA4VVHXXPUP56OBKHCBMVMMU7MSSVEZXB5YLY6AS5PUBOVWJQCDependencies
- [2]
O3GEN2SDMerge text.love - [3]
VZJHGWSPMerge lines.love - [4]
XRP727K3Merge lines.love - [5]
NMRUNROTMerge lines.love - [6]
T4FRZSYLdelete an ancient, unused file - [7]
3PSFWAILMerge lines.love - [8]
KKMFQDR4editing source code from within the app - [9]
K2X6G75Zstart writing some tests for drawings - [10]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [11]
OTIBCAUJlove2d scaffold - [12]
OGUV4HSAremove some memory leaks from rendered fragments - [13]
2L5MEZV3experiment: new edit namespace - [14]
R5QXEHUIsomebody stop me - [15]
73OCE2MCafter much struggle, a brute-force undo - [16]
TLOAPLBJadd a license - [17]
RSZD5A7Gforgot to add json.lua - [18]
2CTN2IEFMerge lines.love - [19]
VHUNJHXBMerge lines.love - [20]
MD3W5IRAnew fork: rip out drawing support - [21]
4YDBYBA4clean up memory leak experiments - [22]
CE4LZV4Tdrop last couple of manual tests - [23]
KMSL74GAsupport selections in the source editor - [24]
VBU5YHLRMerge lines.love - [25]
VP5KC4XZMerge lines.love - [26]
EG5CRNWCMerge lines.love - [27]
XX7G2FFJintermingle freehand line drawings with text - [28]
VHQCNMARseveral more modules - [29]
TVCPXAAUrename - [30]
ETXNVRPTMerge lines.love - [31]
VO2ZVTWKMerge lines.love - [32]
AT3LVCMPMerge text.love - [33]
FS2ITYYHrecord a known issue - [34]
VXORMHMEdelete experimental REPL - [35]
BULPIBEGbeginnings of a module for the text editor - [36]
APX2PY6Gstop tracking wallclock time - [37]
JOPVPUSAediting source code from within the app - [38]
SHUFMMIVMerge text.love - [39]
6BGU2SBJMerge text.love - [40]
6LJZN727handle chords - [41]
D4B52CQ2Merge lines.love - [42]
UYCVUHI5Merge lines.love - [43]
AVTNUQYRbasic test-enabled framework - [44]
66X36NZNa little more prose describing manual_tests - [45]
PX7DDEMOautosave slightly less aggressively - [46]
TO6Y2G3Umore decoupling editor tests from App - [47]
GUOQRUL7Merge lines.love - [48]
36Z442IVback to commit 8123959e52f without code editing - [49]
D2GCFTTTclean up repl functionality - [50]
3QNOKBFMbeginnings of a test harness - [51]
32V6ZHQBMerge lines.love - [52]
RXNR3U5EMerge text.love - [53]
LXTTOB33extract a couple of files - [54]
BLWAYPKVextract a module
Change contents
- file deletion: drawing_tests.lua drawing_tests.lua
Current_time = Current_time + 3.1edit.run_after_textinput(Editor_state, 'p') -- add point-- third pointedit.run_after_mouse_release(Editor_state, Editor_state.left+14, Editor_state.top+Drawing_padding_top+16, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_delete_point_from_polygon/baseline/#shapes')check_eq(drawing.shapes[1].mode, 'polygon', 'F - test_delete_point_from_polygon/baseline/mode')check_eq(#drawing.shapes[1].vertices, 3, 'F - test_delete_point_from_polygon/baseline/vertices')-- hover on a point and deleteApp.mouse_move(Editor_state.left+65, Editor_state.top+Drawing_padding_top+36)edit.run_after_keychord(Editor_state, 'C-d')-- there's < 3 points left, so the whole polygon is deletedcheck_eq(drawing.shapes[1].mode, 'deleted', 'F - test_delete_point_from_polygon')endfunction test_undo_name_point()io.write('\ntest_undo_name_point')-- create a drawing with a lineApp.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.filename = 'foo'Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)Editor_state.current_drawing_mode = 'line'edit.draw(Editor_state)-- draw a lineedit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Drawing_padding_top+6, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+36, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_undo_name_point/baseline/#shapes')check_eq(#drawing.points, 2, 'F - test_undo_name_point/baseline/#points')check_eq(drawing.shapes[1].mode, 'line', 'F - test_undo_name_point/baseline/shape:1')local p1 = drawing.points[drawing.shapes[1].p1]local p2 = drawing.points[drawing.shapes[1].p2]check_eq(p1.x, 5, 'F - test_undo_name_point/baseline/p1:x')check_eq(p1.y, 6, 'F - test_undo_name_point/baseline/p1:y')check_eq(p2.x, 35, 'F - test_undo_name_point/baseline/p2:x')check_eq(p2.y, 36, 'F - test_undo_name_point/baseline/p2:y')check_nil(p2.name, 'F - test_undo_name_point/baseline/p2:name')check_eq(#Editor_state.history, 1, 'F - test_undo_name_point/baseline/history:1')--? print('a', Editor_state.lines.current_drawing)-- enter 'name' mode without moving the mouseedit.run_after_keychord(Editor_state, 'C-n')edit.run_after_textinput(Editor_state, 'A')edit.run_after_keychord(Editor_state, 'return')check_eq(p2.name, 'A', 'F - test_undo_name_point/baseline')check_eq(#Editor_state.history, 3, 'F - test_undo_name_point/baseline/history:2')check_eq(Editor_state.next_history, 4, 'F - test_undo_name_point/baseline/next_history')--? print('b', Editor_state.lines.current_drawing)-- undoedit.run_after_keychord(Editor_state, 'C-z')local drawing = Editor_state.lines[1]local p2 = drawing.points[drawing.shapes[1].p2]check_eq(Editor_state.next_history, 3, 'F - test_undo_name_point/next_history')check_eq(p2.name, '', 'F - test_undo_name_point') -- not quite what it was before, but close enough-- wait until saveedit.run_after_textinput(Editor_state, 'g') -- polygon mode-- second pointApp.mouse_move(Editor_state.left+65, Editor_state.top+Drawing_padding_top+36)edit.run_after_textinput(Editor_state, 'p') -- add point-- fourth pointedit.run_after_mouse_release(Editor_state, Editor_state.left+14, Editor_state.top+Drawing_padding_top+16, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_delete_point_from_polygon/baseline/#shapes')check_eq(drawing.shapes[1].mode, 'polygon', 'F - test_delete_point_from_polygon/baseline/mode')check_eq(#drawing.shapes[1].vertices, 4, 'F - test_delete_point_from_polygon/baseline/vertices')-- hover on a point and deleteApp.mouse_move(Editor_state.left+35, Editor_state.top+Drawing_padding_top+26)edit.run_after_keychord(Editor_state, 'C-d')-- just the one point is deletedcheck_eq(drawing.shapes[1].mode, 'polygon', 'F - test_delete_point_from_polygon/shape')check_eq(#drawing.shapes[1].vertices, 3, 'F - test_delete_point_from_polygon/vertices')endfunction test_delete_point_from_polygon()io.write('\ntest_delete_point_from_polygon')-- create a drawing with two lines connected at a pointApp.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)Editor_state.current_drawing_mode = 'line'edit.draw(Editor_state)-- first pointedit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Drawing_padding_top+6, 1)edit.run_after_textinput(Editor_state, 'p') -- add point-- third pointApp.mouse_move(Editor_state.left+35, Editor_state.top+Drawing_padding_top+26)edit.run_after_textinput(Editor_state, 'g') -- polygon mode-- second pointApp.mouse_move(Editor_state.left+65, Editor_state.top+Drawing_padding_top+36)Current_time = Current_time + 3.1edit.run_after_textinput(Editor_state, 'p')-- release (decides which side of first edge to draw square on)edit.run_after_mouse_release(Editor_state, Editor_state.left+15, Editor_state.top+Drawing_padding_top+26, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_draw_square/#shapes')check_eq(#drawing.points, 5, 'F - test_draw_square/#points') -- currently includes every point addedcheck_eq(drawing.shapes[1].mode, 'square', 'F - test_draw_square/shape_mode')check_eq(#drawing.shapes[1].vertices, 4, 'F - test_draw_square/vertices')local p = drawing.points[drawing.shapes[1].vertices[1]]check_eq(p.x, 35, 'F - test_draw_square/p1:x')check_eq(p.y, 36, 'F - test_draw_square/p1:y')local p = drawing.points[drawing.shapes[1].vertices[2]]check_eq(p.x, 65, 'F - test_draw_square/p2:x')check_eq(p.y, 66, 'F - test_draw_square/p2:y')local p = drawing.points[drawing.shapes[1].vertices[3]]check_eq(p.x, 35, 'F - test_draw_square/p3:x')check_eq(p.y, 96, 'F - test_draw_square/p3:y')local p = drawing.points[drawing.shapes[1].vertices[4]]check_eq(p.x, 5, 'F - test_draw_square/p4:x')check_eq(p.y, 66, 'F - test_draw_square/p4:y')endfunction test_name_point()io.write('\ntest_name_point')-- create a drawing with a lineApp.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.filename = 'foo'Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)Editor_state.current_drawing_mode = 'line'edit.draw(Editor_state)-- draw a lineedit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Drawing_padding_top+6, 1)edit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+36, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_name_point/baseline/#shapes')check_eq(#drawing.points, 2, 'F - test_name_point/baseline/#points')check_eq(drawing.shapes[1].mode, 'line', 'F - test_name_point/baseline/shape:1')local p1 = drawing.points[drawing.shapes[1].p1]local p2 = drawing.points[drawing.shapes[1].p2]check_eq(p1.x, 5, 'F - test_name_point/baseline/p1:x')check_eq(p1.y, 6, 'F - test_name_point/baseline/p1:y')check_eq(p2.x, 35, 'F - test_name_point/baseline/p2:x')check_eq(p2.y, 36, 'F - test_name_point/baseline/p2:y')check_nil(p2.name, 'F - test_name_point/baseline/p2:name')-- enter 'name' mode without moving the mouseedit.run_after_keychord(Editor_state, 'C-n')check_eq(Editor_state.current_drawing_mode, 'name', 'F - test_name_point/mode:1')edit.run_after_textinput(Editor_state, 'A')check_eq(p2.name, 'A', 'F - test_name_point')-- still in 'name' modecheck_eq(Editor_state.current_drawing_mode, 'name', 'F - test_name_point/mode:2')-- exit 'name' modeedit.run_after_keychord(Editor_state, 'return')check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_name_point/mode:3')check_eq(p2.name, 'A', 'F - test_name_point')-- wait until saveedit.run_after_textinput(Editor_state, 'p')-- override second point/first edgeApp.mouse_move(Editor_state.left+65, Editor_state.top+Drawing_padding_top+66)edit.run_after_textinput(Editor_state, 's') -- square mode-- second point/first edgeApp.mouse_move(Editor_state.left+42, Editor_state.top+Drawing_padding_top+45)edit.run_after_textinput(Editor_state, 'p')local drawing = Editor_state.lines[1]check_eq(#drawing.points, 3, 'F - test_draw_rectangle_intermediate/#points') -- currently includes every point addedlocal pending = drawing.pendingcheck_eq(pending.mode, 'rectangle', 'F - test_draw_rectangle_intermediate/shape_mode')check_eq(#pending.vertices, 2, 'F - test_draw_rectangle_intermediate/vertices')local p = drawing.points[pending.vertices[1]]check_eq(p.x, 35, 'F - test_draw_rectangle_intermediate/p1:x')check_eq(p.y, 36, 'F - test_draw_rectangle_intermediate/p1:y')local p = drawing.points[pending.vertices[2]]check_eq(p.x, 75, 'F - test_draw_rectangle_intermediate/p2:x')check_eq(p.y, 76, 'F - test_draw_rectangle_intermediate/p2:y')-- outline of rectangle is drawn based on where the mouse is, but we can't check that so farendfunction test_draw_square()io.write('\ntest_draw_square')-- display a drawing followed by a line of text (you shouldn't ever have a drawing right at the end)App.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)edit.draw(Editor_state)check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_square/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_square/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_square/baseline/mode')check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'F - test_draw_square/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_square/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_square/baseline/#shapes')-- first pointedit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+36, 1)edit.run_after_textinput(Editor_state, 'p')-- override second point/first edgeApp.mouse_move(Editor_state.left+75, Editor_state.top+Drawing_padding_top+76)edit.run_after_textinput(Editor_state, 'r') -- rectangle mode-- second point/first edgeApp.mouse_move(Editor_state.left+42, Editor_state.top+Drawing_padding_top+45)edit.run_after_textinput(Editor_state, 'p')-- release (decides 'thickness' of rectangle perpendicular to first edge)edit.run_after_mouse_release(Editor_state, Editor_state.left+15, Editor_state.top+Drawing_padding_top+26, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_draw_rectangle/#shapes')check_eq(#drawing.points, 5, 'F - test_draw_rectangle/#points') -- currently includes every point addedlocal shape = drawing.shapes[1]check_eq(shape.mode, 'rectangle', 'F - test_draw_rectangle/shape_mode')check_eq(#shape.vertices, 4, 'F - test_draw_rectangle/vertices')local p = drawing.points[shape.vertices[1]]check_eq(p.x, 35, 'F - test_draw_rectangle/p1:x')check_eq(p.y, 36, 'F - test_draw_rectangle/p1:y')local p = drawing.points[shape.vertices[2]]check_eq(p.x, 75, 'F - test_draw_rectangle/p2:x')check_eq(p.y, 76, 'F - test_draw_rectangle/p2:y')local p = drawing.points[shape.vertices[3]]check_eq(p.x, 70, 'F - test_draw_rectangle/p3:x')check_eq(p.y, 81, 'F - test_draw_rectangle/p3:y')local p = drawing.points[shape.vertices[4]]check_eq(p.x, 30, 'F - test_draw_rectangle/p4:x')check_eq(p.y, 41, 'F - test_draw_rectangle/p4:y')endfunction test_draw_rectangle_intermediate()io.write('\ntest_draw_rectangle_intermediate')-- display a drawing followed by a line of text (you shouldn't ever have a drawing right at the end)App.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)edit.draw(Editor_state)check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_rectangle_intermediate/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_rectangle_intermediate/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_rectangle_intermediate/baseline/mode')check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'F - test_draw_rectangle_intermediate/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_rectangle_intermediate/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_rectangle_intermediate/baseline/#shapes')-- first pointedit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+36, 1)edit.run_after_textinput(Editor_state, 'p')-- override second point/first edgeApp.mouse_move(Editor_state.left+75, Editor_state.top+Drawing_padding_top+76)edit.run_after_textinput(Editor_state, 'r') -- rectangle mode-- second point/first edgeApp.mouse_move(Editor_state.left+42, Editor_state.top+Drawing_padding_top+45)edit.run_after_textinput(Editor_state, 'p') -- add point-- final pointedit.run_after_mouse_release(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+26, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_draw_polygon/#shapes')check_eq(#drawing.points, 3, 'F - test_draw_polygon/vertices')local shape = drawing.shapes[1]check_eq(shape.mode, 'polygon', 'F - test_draw_polygon/shape_mode')check_eq(#shape.vertices, 3, 'F - test_draw_polygon/vertices')local p = drawing.points[shape.vertices[1]]check_eq(p.x, 5, 'F - test_draw_polygon/p1:x')check_eq(p.y, 6, 'F - test_draw_polygon/p1:y')local p = drawing.points[shape.vertices[2]]check_eq(p.x, 65, 'F - test_draw_polygon/p2:x')check_eq(p.y, 36, 'F - test_draw_polygon/p2:y')local p = drawing.points[shape.vertices[3]]check_eq(p.x, 35, 'F - test_draw_polygon/p3:x')check_eq(p.y, 26, 'F - test_draw_polygon/p3:y')endfunction test_draw_rectangle()io.write('\ntest_draw_rectangle')-- display a drawing followed by a line of text (you shouldn't ever have a drawing right at the end)App.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)edit.draw(Editor_state)check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_rectangle/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_rectangle/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_rectangle/baseline/mode')check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'F - test_draw_rectangle/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_rectangle/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_rectangle/baseline/#shapes')-- first pointedit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+36, 1)edit.run_after_textinput(Editor_state, 'g') -- polygon mode-- second pointApp.mouse_move(Editor_state.left+65, Editor_state.top+Drawing_padding_top+36)edit.run_after_textinput(Editor_state, 'a') -- arc modeedit.run_after_mouse_release(Editor_state, Editor_state.left+35+50, Editor_state.top+Drawing_padding_top+36+50, 1) -- 45°local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_draw_arc/#shapes')check_eq(#drawing.points, 1, 'F - test_draw_arc/#points')check_eq(drawing.shapes[1].mode, 'arc', 'F - test_draw_horizontal_line/shape_mode')local arc = drawing.shapes[1]check_eq(arc.radius, 30, 'F - test_draw_arc/radius')local center = drawing.points[arc.center]check_eq(center.x, 35, 'F - test_draw_arc/center:x')check_eq(center.y, 36, 'F - test_draw_arc/center:y')check_eq(arc.start_angle, 0, 'F - test_draw_arc/start:angle')check_eq(arc.end_angle, math.pi/4, 'F - test_draw_arc/end:angle')endfunction test_draw_polygon()io.write('\ntest_draw_polygon')-- display a drawing followed by a line of text (you shouldn't ever have a drawing right at the end)App.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)edit.draw(Editor_state)check_eq(Editor_state.current_drawing_mode, 'line', 'F - test_draw_polygon/baseline/drawing_mode')check_eq(#Editor_state.lines, 2, 'F - test_draw_polygon/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_polygon/baseline/mode')check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'F - test_draw_polygon/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_polygon/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_polygon/baseline/#shapes')-- first pointedit.run_after_mouse_press(Editor_state, Editor_state.left+5, Editor_state.top+Drawing_padding_top+6, 1)edit.run_after_textinput(Editor_state, 'o')edit.run_after_mouse_release(Editor_state, Editor_state.left+35+30, Editor_state.top+Drawing_padding_top+36, 1)local drawing = Editor_state.lines[1]check_eq(#drawing.shapes, 1, 'F - test_draw_circle_mid_stroke/#shapes')check_eq(#drawing.points, 1, 'F - test_draw_circle_mid_stroke/#points')check_eq(drawing.shapes[1].mode, 'circle', 'F - test_draw_horizontal_line/shape_mode')check_eq(drawing.shapes[1].radius, 30, 'F - test_draw_circle_mid_stroke/radius')local center = drawing.points[drawing.shapes[1].center]check_eq(center.x, 35, 'F - test_draw_circle_mid_stroke/center:x')check_eq(center.y, 36, 'F - test_draw_circle_mid_stroke/center:y')endfunction test_draw_arc()io.write('\ntest_draw_arc')-- display a drawing followed by a line of text (you shouldn't ever have a drawing right at the end)App.screen.init{width=Test_margin_left+256, height=300} -- drawing coordinates 1:1 with pixelsEditor_state = edit.initialize_test_state()Editor_state.lines = load_array{'```lines', '```', ''}Text.redraw_all(Editor_state)Editor_state.current_drawing_mode = 'circle'edit.draw(Editor_state)check_eq(#Editor_state.lines, 2, 'F - test_draw_arc/baseline/#lines')check_eq(Editor_state.lines[1].mode, 'drawing', 'F - test_draw_arc/baseline/mode')check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'F - test_draw_arc/baseline/y')check_eq(Editor_state.lines[1].h, 128, 'F - test_draw_arc/baseline/y')check_eq(#Editor_state.lines[1].shapes, 0, 'F - test_draw_arc/baseline/#shapes')-- draw an arcedit.run_after_mouse_press(Editor_state, Editor_state.left+35, Editor_state.top+Drawing_padding_top+36, 1)App.mouse_move(Editor_state.left+35+30, Editor_state.top+Drawing_padding_top+36) - file deletion: source_edit.lua source_edit.lua
local drawing_index, drawing = Drawing.current_drawing(State)if drawing_index == nil thenfor _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scrollText.textinput(State, t)endendschedule_save(State)endfunction edit.keychord_pressed(State, chord, key)