Merge upstream into main
[?]
Jul 21, 2022, 12:14 AM
BCRJ6MHLYM6H4R7NXR2JD6SHQQJILLQIJE73LACRCLIPSHOHVNWQCDependencies
- [2]
2RO7JXUCMerge upstream into main - [3]
7S6CIN7IMerge upstream into main - [4]
3OTESDW6move drawing.starty into line cache - [5]
XNFTJHC4split keyboard handling between Text and Drawing - [6]
DRFE3B3Zmouse buttons are integers, not strings - [7]
OWK3U6VDtests for drawing polygons - [8]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [9]
2JLVAYHBstart decoupling editor tests from App - [10]
W7JMT5V2rip out most support for polygons - [11]
KTZQ57HVreplace globals with args in a few functions - [12]
R3JZDBI2drop heavyweight near check on file load/store - [13]
LAW2O3NWextract variable Margin_left - [14]
BLWAYPKVextract a module - [15]
6DE7RBZ6move mouse_released events to Drawing - [16]
WDMPH4ANdrop support for squares - [17]
DDXXXXBRnew mode for polygons - [18]
23MA4T3Gadd state arg to Drawing.keychord_pressed - [19]
7CEOB56DMerge upstream into main - [20]
VHQCNMARseveral more modules - [21]
7JH2ZT3Fadd state arg to Drawing.draw - [22]
DR5XD5JQper-polygon icons - [23]
NYQ7HD4Dmove - [24]
LF7BWEG4group all editor globals - [25]
LNUHQOGHstart passing in Editor_state explicitly - [26]
3HVBAZPAadd state arg to a few functions - [27]
7DYUAOI6test: undo moving point - [28]
OEUU62GMMerge upstream into main - [29]
4AXV2HG4all pending manual tests done! - [30]
4CTZOJPCstop pretending globals are local - [31]
WTDKUACNrectangle and square shapes - [32]
YCDYGEZUinclude drawing index in a few places - [33]
SRVDX4I5local var - [34]
QXVD2RIFadd state arg to Drawing.mouse_released - [35]
P5QNVXSNdrop final mention of state global beyond main.lua - [36]
4KC7I3E2make colors easier to edit - [37]
UHB4GARJleft/right margin -> left/right coordinates - [38]
TGZAJUEFbring back a set of constants - [*]
K2X6G75Zstart writing some tests for drawings
Change contents
- resurrect zombie in drawing_tests.lua at line 244[4.1120]→[5.113425:113589](∅→∅),[5.3148]→[5.113425:113589](∅→∅),[5.27688]→[5.113425:113589](∅→∅),[5.27688]→[5.113425:113589](∅→∅),[5.113425]→[5.113425:113589](∅→∅),[5.3148]→[5.113425:113589](∅→∅)
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') - edit in drawing_tests.lua at line 670
check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'F - test_draw_square/baseline/y') - resolve order conflict in drawing_tests.lua at line 670[5.2215]
- replacement in drawing.lua at line 76
Drawing.draw_pending_shape(State, line, line.y, State.left,State.right)Drawing.draw_pending_shape(line, line_cache.starty, State.left,State.right)Drawing.draw_pending_shape(State, line, line_cache.starty, State.left,State.right) - resurrect zombie in drawing.lua at line 210
- resolve order conflict in drawing.lua at line 211
- replacement in drawing.lua at line 347
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-drawing.y, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width) - edit in drawing.lua at line 423[5.7671]→[5.306:359](∅→∅),[5.596]→[5.306:359](∅→∅),[5.467]→[5.2537:2661](∅→∅),[5.467]→[5.2537:2661](∅→∅),[5.690]→[4.4158:4354](∅→∅),[5.690]→[4.4158:4354](∅→∅)
local _,drawing = Drawing.current_drawing(State)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-drawing.y, State.width)local _,drawing,line_cache = Drawing.current_drawing(State)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width) - resurrect zombie in drawing.lua at line 423
local _,drawing,line_cache = Drawing.current_drawing(State)local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width) - resurrect zombie in drawing.lua at line 425[5.2661]→[5.7963:8042](∅→∅),[4.4551]→[5.7963:8042](∅→∅),[5.39140]→[5.7963:8042](∅→∅),[5.2661]→[5.7963:8042](∅→∅)
local j = Drawing.find_or_insert_point(drawing.points, mx,my, State.width) - edit in drawing.lua at line 728[5.1525]→[2.783:783](∅→∅),[5.2366]→[4.3817:3931](∅→∅),[5.2366]→[4.3817:3931](∅→∅),[5.1231]→[4.3589:3701](∅→∅),[5.1231]→[4.3589:3701](∅→∅),[5.1231]→[4.3589:3701](∅→∅)
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width) - resolve order conflict in drawing.lua at line 728[5.1525]