Merge lines.love
[?]
Sep 20, 2023, 9:32 PM
YXQOITYSGYQQBOMF7CJ33C2CTDAI5R2W2RCRSKJ6JTLV7MS4WVXACDependencies
- [2]
R2ASHK5Cfix a bad merge - [3]
I4S4EFYXMerge lines.love - [4]
656FM555bugfix: clear selection when clicking above or below lines - [5]
T4FRZSYLdelete an ancient, unused file - [6]
BLWAYPKVextract a module - [7]
KKMFQDR4editing source code from within the app - [8]
2TQUKHBCMerge lines.love - [9]
2MGBV7NPbugfix: crash when using mouse wheel - [10]
ED4Z6ORCcleaner API for file-system access - [11]
VHUNJHXBMerge lines.love - [12]
N2NUGNN4include a brief reference enabling many useful apps - [13]
GFXWHTE6mouse wheel support - [14]
G54H3YG2get rid of all bifold text - [15]
66X36NZNa little more prose describing manual_tests - [16]
TLOAPLBJadd a license - [17]
RSZD5A7Gforgot to add json.lua - [18]
ZLJYLPOTMerge lines.love - [19]
VP5KC4XZMerge lines.love - [20]
3QNOKBFMbeginnings of a test harness - [21]
5SM6DRHKport inscript's bugfix to source editor - [22]
RU4HIK43Merge lines.love - [23]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [24]
OTIBCAUJlove2d scaffold - [25]
4SR3Z4Y3document the version of LÖVE I've been using - [26]
A4BSGS2CMerge lines.love - [27]
FS2ITYYHrecord a known issue - [28]
2CTN2IEFMerge lines.love - [29]
ORRSP7FVdeduce test names on failures - [30]
7FPELAZBah, I see the problem - [31]
KOTNETIMrepeat changes on source editor - [32]
3PSFWAILMerge lines.love - [33]
D4B52CQ2Merge lines.love - [34]
LF7BWEG4group all editor globals - [35]
K2X6G75Zstart writing some tests for drawings - [36]
QJISOCHJsome temporary logging to catch a bug - [37]
VXORMHMEdelete experimental REPL - [38]
JOPVPUSAediting source code from within the app - [39]
CE4LZV4Tdrop last couple of manual tests - [40]
2L5MEZV3experiment: new edit namespace - [41]
73OCE2MCafter much struggle, a brute-force undo - [42]
BULPIBEGbeginnings of a module for the text editor - [43]
D2GCFTTTclean up repl functionality - [44]
KMSL74GAsupport selections in the source editor - [45]
K74U4BAUMerge lines.love - [46]
3XNFQDDNMerge lines.love - [47]
AVTNUQYRbasic test-enabled framework - [48]
OGUV4HSAremove some memory leaks from rendered fragments - [49]
ONHKBLLCMerge lines.love - [50]
34BZ5ZKNMerge lines.love - [51]
6LJZN727handle chords - [52]
VHQCNMARseveral more modules - [53]
LNUHQOGHstart passing in Editor_state explicitly - [54]
ORKN6EOBMerge lines.love - [55]
R5QXEHUIsomebody stop me - [56]
LWPFEZBIMerge lines.love - [57]
VOU73AK6Merge lines.love - [58]
MD3W5IRAnew fork: rip out drawing support - [59]
SGMA5JLEsave the list of tests in repo - [60]
B6DS4GZCMerge lines.love - [61]
LXTTOB33extract a couple of files - [62]
4YDBYBA4clean up memory leak experiments - [63]
WB6SIB7HMerge lines.love - [64]
6XCJX4DZbugfix: inscript's bug - [65]
XX7G2FFJintermingle freehand line drawings with text - [66]
2344TV56Merge lines.love - [67]
TVCPXAAUrename
Change contents
- file deletion: source_text_tests.lua source_text_tests.lua
-- selection remains emptycheck_nil(Editor_state.selection1.line, 'selection is empty to avoid perturbing future edits')endfunction test_draw_text()check_eq(Editor_state.cursor1.line, 1, 'cursor')-- selection remains emptycheck_nil(Editor_state.selection1.line, 'selection is empty to avoid perturbing future edits')endfunction test_click_below_all_lines()-- display one lineApp.screen.init{width=50, height=80}Editor_state = edit.initialize_test_state()Editor_state.lines = load_array{'abc'}Text.redraw_all(Editor_state)Editor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}-- click below first lineedit.draw(Editor_state)edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+50, 1)-- cursor doesn't movecheck_eq(Editor_state.cursor1.line, 1, 'cursor')Editor_state.selection1 = {}-- click on the empty lineedit.draw(Editor_state)edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)-- cursor movesEditor_state.selection1 = {}-- click on the other lineedit.draw(Editor_state)edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)-- cursor movesEditor_state.selection1 = {}-- click to the left of the lineedit.draw(Editor_state)edit.run_after_mouse_click(Editor_state, Editor_state.left-4,Editor_state.top+5, 1)-- cursor moves to start of line - file deletion: source_edit.lua source_edit.lua
State.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endendfunction edit.mouse_wheel_move(State, dx,dy)if dy > 0 thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}endendfunction edit.clean_up_mouse_press(State)if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1endend-- still here? mouse release is below all screen linesState.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)edit.clean_up_mouse_press(State)--? print_and_log(('edit.mouse_release: finally selection %s,%s cursor %d,%d'):format(tostring(State.selection1.line), tostring(State.selection1.pos), State.cursor1.line, State.cursor1.pos))edit.clean_up_mouse_press(State)returnendendendif y < State.top thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}edit.clean_up_mouse_press(State)returnendfor line_index,line in ipairs(State.lines) doif line.mode == 'text' thenif Text.in_line(State, line_index, x,y) then-- still here? mouse press is below all screen linesState.old_cursor1 = State.cursor1State.old_selection1 = State.selection1State.mousepress_shift = App.shift_down()State.selection1 = {line=State.screen_bottom1.line,pos=Text.pos_at_end_of_screen_line(State, State.screen_bottom1),} - edit in source_text_tests.lua at line 278
Editor_state.selection1 = {} - edit in source_text_tests.lua at line 298
Editor_state.selection1 = {} - edit in source_text_tests.lua at line 317
Editor_state.selection1 = {} - edit in source_text_tests.lua at line 322
check_eq(Editor_state.cursor1.line, 1, 'cursor')-- selection remains emptycheck_nil(Editor_state.selection1.line, 'selection is empty to avoid perturbing future edits')endfunction test_click_below_all_lines()-- display one lineApp.screen.init{width=50, height=80}Editor_state = edit.initialize_test_state()Editor_state.lines = load_array{'abc'}Text.redraw_all(Editor_state)Editor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}-- click below first lineedit.draw(Editor_state)edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+50, 1)-- cursor doesn't move - edit in source_text_tests.lua at line 342
-- selection remains emptycheck_nil(Editor_state.selection1.line, 'selection is empty to avoid perturbing future edits') - replacement in source_edit.lua at line 298
-- still here? click is below all screen lines-- still here? mouse press is below all screen lines - edit in source_edit.lua at line 320
if y < State.top thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}edit.clean_up_mouse_press(State)returnend - replacement in source_edit.lua at line 335
if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1endendState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endbreakedit.clean_up_mouse_press(State)return - edit in source_edit.lua at line 340
-- still here? mouse release is below all screen linesState.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)edit.clean_up_mouse_press(State) - edit in source_edit.lua at line 345
endendfunction edit.clean_up_mouse_press(State)if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1end - edit in source_edit.lua at line 356
State.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}end - replacement in edit.lua at line 195
-- still here? click is below all screen lines-- still here? mouse press is below all screen lines - edit in edit.lua at line 208
if y < State.top thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}edit.clean_up_mouse_press(State)returnend - replacement in edit.lua at line 221
if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1endendState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endbreakedit.clean_up_mouse_press(State)return - edit in edit.lua at line 225
-- still here? mouse release is below all screen linesState.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)edit.clean_up_mouse_press(State) - edit in edit.lua at line 232
function edit.clean_up_mouse_press(State)if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1endendState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endend - edit in edit.lua at line 462[5.2969]→[4.3075:3135](∅→∅),[5.2969]→[4.3075:3135](∅→∅),[5.2969]→[4.3075:3135](∅→∅),[5.1870]→[4.3603:3753](∅→∅),[5.1870]→[4.3603:3753](∅→∅),[5.3165]→[4.3365:3602](∅→∅),[5.3165]→[4.3365:3602](∅→∅),[5.3165]→[4.3365:3602](∅→∅),[5.9624]→[4.3136:3364](∅→∅),[5.9624]→[4.3136:3364](∅→∅),[5.9624]→[4.3136:3364](∅→∅),[5.2768]→[4.2908:3074](∅→∅),[5.2768]→[4.2908:3074](∅→∅),[5.2768]→[4.2908:3074](∅→∅),[5.2288]→[4.2852:2907](∅→∅),[5.2288]→[4.2852:2907](∅→∅)
edit.clean_up_mouse_press(State)returnState.old_cursor1, State.old_selection1, State.mousepress_shift = nilif eq(State.cursor1, State.selection1) thenState.selection1 = {}endendendfunction edit.clean_up_mouse_press(State)if State.mousepress_shift thenif State.old_selection1.line == nil thenState.selection1 = State.old_cursor1elseState.selection1 = State.old_selection1end-- still here? mouse release is below all screen linesState.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)edit.clean_up_mouse_press(State)if y < State.top thenState.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}edit.clean_up_mouse_press(State)returnend-- still here? mouse press is below all screen lines - resolve order conflict in edit.lua at line 462[2.12430]