Merge lines.love

[?]
Mar 17, 2023, 6:02 PM
U3MJNFUY4ER65BIKP4D7JGVYWFPXA55KBJYD4RH5KRRKRQXBAW5AC

Dependencies

  • [2] KG7YVGVR Merge lines.love
  • [3] XS3PZI7G Merge lines.love
  • [4] 7VGDIPLC more robust state validation
  • [5] IX5YTLSV state validation in source editor as well
  • [6] VXORMHME delete experimental REPL
  • [7] VBU5YHLR Merge lines.love
  • [8] SDO4DHNU source: load cursor position from settings
  • [9] XX7G2FFJ intermingle freehand line drawings with text
  • [10] ERQKFTPV extract method
  • [11] AOZX2G5F source: no commandline args
  • [12] R5QXEHUI somebody stop me
  • [13] MD3W5IRA new fork: rip out drawing support
  • [14] KMSL74GA support selections in the source editor
  • [15] OTIBCAUJ love2d scaffold
  • [16] DB7HJBHJ Merge lines.love
  • [17] A4BSGS2C Merge lines.love
  • [18] GUOQRUL7 Merge lines.love
  • [19] OGUV4HSA remove some memory leaks from rendered fragments
  • [20] L2FWWEQL source: remember cursor position of multiple files
  • [21] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [22] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [23] RSZD5A7G forgot to add json.lua
  • [24] B4JEWKWI hide editor cursor while in file navigator
  • [25] 5STHSG4U remove some duplication
  • [26] HCFDBUXH fix stale comment
  • [27] P3K7UH5C Merge lines.love
  • [28] K74U4BAU Merge lines.love
  • [29] D76MS2G2 Merge lines.love
  • [30] 2L5MEZV3 experiment: new edit namespace
  • [31] ZTZOO2OQ Merge lines.love
  • [32] ORKN6EOB Merge lines.love
  • [33] AVTNUQYR basic test-enabled framework
  • [34] BULPIBEG beginnings of a module for the text editor
  • [35] LF7BWEG4 group all editor globals
  • [36] VP5KC4XZ Merge lines.love
  • [37] A23MMLJH migrate old settings, attempt #3
  • [38] LXTTOB33 extract a couple of files
  • [39] LNUHQOGH start passing in Editor_state explicitly
  • [40] 66X36NZN a little more prose describing manual_tests
  • [41] 4KC7I3E2 make colors easier to edit
  • [42] TVCPXAAU rename
  • [43] JOPVPUSA editing source code from within the app
  • [44] DCO5BQWV Merge lines.love
  • [45] EMG7SDLW bugfix: cold start
  • [46] 3PSFWAIL Merge lines.love
  • [47] VHUNJHXB Merge lines.love
  • [48] ATQO62TF Merge lines.love
  • [49] KKMFQDR4 editing source code from within the app
  • [50] 4YDBYBA4 clean up memory leak experiments
  • [51] 2CTN2IEF Merge lines.love
  • [52] ZJOSQFN6 bugfix: path munging on Windows
  • [53] T4FRZSYL delete an ancient, unused file
  • [54] B4FAIVRA Merge lines.love
  • [55] D2GCFTTT clean up repl functionality
  • [56] 3QNOKBFM beginnings of a test harness
  • [57] QS3YLNKZ Merge lines.love
  • [58] CE4LZV4T drop last couple of manual tests
  • [59] K2X6G75Z start writing some tests for drawings
  • [60] BLWAYPKV extract a module
  • [61] CQYKYJJU remember window positions across restart/ctrl+e
  • [62] FS2ITYYH record a known issue
  • [63] OI4FPFIN support drawings in the source editor
  • [64] ETXNVRPT Merge lines.love
  • [65] VHQCNMAR several more modules
  • [66] TLOAPLBJ add a license
  • [67] 2CK5QI7W make love event names consistent
  • [68] 6LJZN727 handle chords
  • [69] 73OCE2MC after much struggle, a brute-force undo

Change contents

  • file deletion: source_edit.lua (----------)source_edit.lua (----------)
    [6.2][6.165725:165764](),[6.2][6.165725:165764](),[6.165764][6.152440:152440]()
    State.cursor1 = {line=i, pos=1}
    break
    end
    end
    end
    function edit.check_locs(State)
    -- if State is inconsistent (i.e. file changed by some other program),
    -- throw away all cursor state entirely
    if edit.invalid1(State, State.screen_top1)
    or edit.invalid1(State, State.cursor1)
    or not edit.cursor_on_text(State)
    or not Text.le1(State.screen_top1, State.cursor1) then
    State.screen_top1 = {line=1, pos=1}
    edit.put_cursor_on_first_text_line(State)
    end
    end
    function edit.invalid1(State, loc1)
    return loc1.line > #State.lines
    or loc1.pos > #State.lines[loc1.line].data
    end
    function edit.cursor_on_text(State)
    return State.cursor1.line <= #State.lines
    and State.lines[State.cursor1.line].mode == 'text'
    end
    function edit.put_cursor_on_first_text_line(State)
    for i,line in ipairs(State.lines) do
    if line.mode == 'text' then
  • file deletion: source.lua (----------)source.lua (----------)
    [6.2][6.177652:177686](),[6.2][6.177652:177686](),[6.177686][6.165766:165766]()
    edit.check_locs(Editor_state)
  • file deletion: run.lua (----------)run.lua (----------)
    [6.2][6.184046:184077](),[6.2][6.184046:184077](),[6.184077][6.178044:178044]()
    edit.check_locs(Editor_state)
    love.window.setTitle('lines.love - '..Editor_state.filename)
    end
    function run.draw()
    edit.draw(Editor_state)
    end
    function run.update(dt)
    Cursor_time = Cursor_time + dt
    edit.update(Editor_state, dt)
    end
    function run.quit()
    edit.quit(Editor_state)
    end
    function run.settings()
    edit.check_locs(Editor_state)
    love.window.setTitle('lines.love - '..Editor_state.filename)
    if #arg > 1 then
    print('ignoring commandline args after '..arg[1])
    end
    if rawget(_G, 'jit') then
    jit.off()
    jit.flush()
    end
    end
    function run.load_settings()
    love.graphics.setFont(love.graphics.newFont(Settings.font_height))
  • replacement in source_edit.lua at line 118
    [6.155413][6.18273:18307]()
    function edit.fixup_cursor(State)
    [6.155413]
    [6.18307]
    function edit.check_locs(State)
    -- if State is inconsistent (i.e. file changed by some other program),
    -- throw away all cursor state entirely
    if edit.invalid1(State, State.screen_top1)
    or edit.invalid1(State, State.cursor1)
    or not edit.cursor_on_text(State)
    or not Text.le1(State.screen_top1, State.cursor1) then
    State.screen_top1 = {line=1, pos=1}
    edit.put_cursor_on_first_text_line(State)
    end
    end
    function edit.invalid1(State, loc1)
    return loc1.line > #State.lines
    or loc1.pos > #State.lines[loc1.line].data
    end
    function edit.cursor_on_text(State)
    return State.cursor1.line <= #State.lines
    and State.lines[State.cursor1.line].mode == 'text'
    end
    function edit.put_cursor_on_first_text_line(State)
  • replacement in source_edit.lua at line 143
    [6.18378][6.18378:18407]()
    State.cursor1.line = i
    [6.18378]
    [6.18407]
    State.cursor1 = {line=i, pos=1}
  • edit in source.lua at line 90
    [6.167956]
    [6.167956]
    edit.check_locs(Editor_state)
  • edit in run.lua at line 35
    [6.178990]
    [6.178990]
    edit.check_locs(Editor_state)
  • edit in run.lua at line 112
    [6.182051]
    [6.182051]
    edit.check_locs(Editor_state)
  • resurrect zombie in edit.lua at line 77
    [6.3868][4.92:331](),[6.3868][4.92:331]()
    function edit.check_locs(State)
    -- if State is inconsistent (i.e. file changed by some other program),
    -- throw away all cursor state entirely
    if edit.invalid1(State, State.screen_top1)
    or edit.invalid1(State, State.cursor1)
  • edit in edit.lua at line 82
    [4.331][4.331:371](),[4.331][4.331:371]()
    or not edit.cursor_on_text(State)
  • replacement in edit.lua at line 84
    [4.472][4.472:518](),[4.472][4.472:518]()
    edit.put_cursor_on_first_text_line(State)
    [4.472]
    [4.518]
    State.cursor1 = {line=1, pos=1}
  • edit in edit.lua at line 91
    [4.648][4.648:790](),[4.648][4.648:790]()
    end
    function edit.cursor_on_text(State)
    return State.cursor1.line <= #State.lines
    and State.lines[State.cursor1.line].mode == 'text'
  • edit in edit.lua at line 93
    [4.795][4.795:846](),[4.795][4.795:846](),[6.292][4.847:885](),[6.292][4.847:885]()
    function edit.put_cursor_on_first_text_line(State)
    State.cursor1 = {line=i, pos=1}