Merge lines.love

[?]
Jun 8, 2023, 8:12 AM
3XNFQDDNFGTN6ZFAB47AR6Q3663WLXDYC3K5TERYUWDM6U2FNOVAC

Dependencies

  • [2] ONHKBLLC Merge lines.love
  • [3] SW7BSBMJ several bugfixes in saving/loading cursor position
  • [4] SGMA5JLE save the list of tests in repo
  • [5] 4YDBYBA4 clean up memory leak experiments
  • [6] BLWAYPKV extract a module
  • [7] N2NUGNN4 include a brief reference enabling many useful apps
  • [8] 7VGDIPLC more robust state validation
  • [9] AVTNUQYR basic test-enabled framework
  • [10] K2X6G75Z start writing some tests for drawings
  • [11] 2L5MEZV3 experiment: new edit namespace
  • [12] ZQDQLLCL bugfix
  • [13] 6LJZN727 handle chords
  • [14] ZLJYLPOT Merge lines.love
  • [15] VXORMHME delete experimental REPL
  • [16] U3MJNFUY Merge lines.love
  • [17] BULPIBEG beginnings of a module for the text editor
  • [18] KMSL74GA support selections in the source editor
  • [19] C3NYQP57 Merge lines.love
  • [20] OTIBCAUJ love2d scaffold
  • [21] AF253GHL bugfix
  • [22] 3QNOKBFM beginnings of a test harness
  • [23] VHQCNMAR several more modules
  • [24] TVCPXAAU rename
  • [25] CQYKYJJU remember window positions across restart/ctrl+e
  • [26] RSZD5A7G forgot to add json.lua
  • [27] VBU5YHLR Merge lines.love
  • [28] JKENJ2UG Merge lines.love
  • [29] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [30] LXTTOB33 extract a couple of files
  • [31] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [32] 2CTN2IEF Merge lines.love
  • [33] DCO5BQWV Merge lines.love
  • [34] 44O46KDA Merge lines.love
  • [35] JDZVBFEI Merge lines.love
  • [36] FS2ITYYH record a known issue
  • [37] A4BSGS2C Merge lines.love
  • [38] APYPFFS3 call edit rather than App callbacks in tests
  • [39] ORKN6EOB Merge lines.love
  • [40] VHUNJHXB Merge lines.love
  • [41] TLOAPLBJ add a license
  • [42] KKMFQDR4 editing source code from within the app
  • [43] XX7G2FFJ intermingle freehand line drawings with text
  • [44] MD3W5IRA new fork: rip out drawing support
  • [45] MU2HIRR6 Merge lines.love
  • [46] 2344TV56 Merge lines.love
  • [47] K74U4BAU Merge lines.love
  • [48] KG7YVGVR Merge lines.love
  • [49] OGD5RAQK bugfix: naming points in drawings
  • [50] R5QXEHUI somebody stop me
  • [51] CE4LZV4T drop last couple of manual tests
  • [52] D2GCFTTT clean up repl functionality
  • [53] 3PSFWAIL Merge lines.love
  • [54] P3K7UH5C Merge lines.love
  • [55] 73OCE2MC after much struggle, a brute-force undo
  • [56] VP5KC4XZ Merge lines.love
  • [57] T4FRZSYL delete an ancient, unused file
  • [58] 66X36NZN a little more prose describing manual_tests
  • [59] ZTZOO2OQ Merge lines.love
  • [60] OGUV4HSA remove some memory leaks from rendered fragments
  • [61] JOPVPUSA editing source code from within the app

Change contents

  • file deletion: run.lua (----------)run.lua (----------)
    [4.2][4.184046:184077](),[4.2][4.184046:184077](),[4.184077][4.178044:178044]()
    function absolutize(path)
    if is_relative_path(path) then
    return love.filesystem.getWorkingDirectory()..'/'..path -- '/' should work even on Windows
    end
    return path
    end
    function run.mouse_press(x,y, mouse_button)
    filename=absolutize(Editor_state.filename),
    screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1
    }
    end
    if #arg > 0 and Editor_state.filename ~= absolutize(arg[1]) then
    Editor_state.filename = arg[1]
    load_from_disk(Editor_state)
    Text.redraw_all(Editor_state)
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.cursor1 = {line=1, pos=1}
  • replacement in run.lua at line 22
    [4.178699][4.178699:178718]()
    if #arg > 0 then
    [4.178699]
    [4.178718]
    if #arg > 0 and Editor_state.filename ~= absolutize(arg[1]) then
  • edit in run.lua at line 156
    [4.2331][4.198:204](),[4.198][4.198:204](),[4.204][4.182391:182432](),[4.182391][4.182391:182432](),[4.182432][4.652:793]()
    end
    local filename = Editor_state.filename
    if is_relative_path(filename) then
    filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
  • replacement in run.lua at line 161
    [4.182725][4.182725:182748]()
    filename=filename,
    [4.182725]
    [4.182748]
    filename=absolutize(Editor_state.filename),
  • edit in run.lua at line 166
    [4.182826]
    [4.16]
    function absolutize(path)
    if is_relative_path(path) then
    return love.filesystem.getWorkingDirectory()..'/'..path -- '/' should work even on Windows
    end
    return path
    end
  • edit in edit.lua at line 76
    [4.286][4.286:331](),[4.286][4.286:331]()
    or edit.invalid1(State, State.cursor1)
  • resurrect zombie in edit.lua at line 76
    [4.286][3.326:363](),[4.286][3.326:363]()
    or edit.invalid_cursor1(State)
  • edit in edit.lua at line 88
    [4.258]
    [4.790]
    end
    -- cursor loc in particular differs from other locs in one way:
    -- pos might occur just after end of line
    function edit.invalid_cursor1(State)
    local cursor1 = State.cursor1
    if cursor1.line > #State.lines then return true end
    local l = State.lines[cursor1.line]
    if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing line
    return cursor1.pos > #State.lines[cursor1.line].data + 1
  • edit in edit.lua at line 448
    [4.7283][4.7283:7287](),[4.7287][2.6849:6849]()
    end
  • resurrect zombie in edit.lua at line 448
    [4.258][3.364:368](),[4.258][3.364:368]()
    end
  • resolve order conflict in edit.lua at line 448
    [4.7283]
    [3.364]
  • edit in edit.lua at line 449
    [3.368][3.368:792](),[3.368][3.368:792]()
    -- cursor loc in particular differs from other locs in one way:
    -- pos might occur just after end of line
    function edit.invalid_cursor1(State)
    local cursor1 = State.cursor1
    if cursor1.line > #State.lines then return true end
    local l = State.lines[cursor1.line]
    if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing line
    return cursor1.pos > #State.lines[cursor1.line].data + 1