Merge lines.love

[?]
Sep 17, 2023, 4:24 PM
I4S4EFYX6P4RSBCCRAYYXA5MD63T3YINN36LOQXXDKMN7MVS6WNAC

Dependencies

  • [2] 34BZ5ZKN Merge lines.love
  • [3] T7EAACC5 bugfix to the helper I added yesterday
  • [4] O2IL6JT2 port an old fix to source editor
  • [5] IENTL2IT indent
  • [6] R5QXEHUI somebody stop me
  • [7] TLOAPLBJ add a license
  • [8] K2X6G75Z start writing some tests for drawings
  • [9] IX5YTLSV state validation in source editor as well
  • [10] 3QNOKBFM beginnings of a test harness
  • [11] NVSC4N4K change a helper slightly
  • [12] LNUHQOGH start passing in Editor_state explicitly
  • [13] LWPFEZBI Merge lines.love
  • [14] T4FRZSYL delete an ancient, unused file
  • [15] 2TQUKHBC Merge lines.love
  • [16] VHQCNMAR several more modules
  • [17] 7VGDIPLC more robust state validation
  • [18] ZLJYLPOT Merge lines.love
  • [19] BLWAYPKV extract a module
  • [20] BULPIBEG beginnings of a module for the text editor
  • [21] 2344TV56 Merge lines.love
  • [22] SW7BSBMJ several bugfixes in saving/loading cursor position
  • [23] XX7G2FFJ intermingle freehand line drawings with text
  • [24] VXORMHME delete experimental REPL
  • [25] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [26] ED4Z6ORC cleaner API for file-system access
  • [27] RSZD5A7G forgot to add json.lua
  • [28] LIKTH6HM update stale source X-(
  • [29] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [30] D2GCFTTT clean up repl functionality
  • [31] RU4HIK43 Merge lines.love
  • [32] ORKN6EOB Merge lines.love
  • [33] ONHKBLLC Merge lines.love
  • [34] TVCPXAAU rename
  • [35] APX2PY6G stop tracking wallclock time
  • [36] 4YDBYBA4 clean up memory leak experiments
  • [37] VHUNJHXB Merge lines.love
  • [38] 2L5MEZV3 experiment: new edit namespace
  • [39] SGMA5JLE save the list of tests in repo
  • [40] WB6SIB7H Merge lines.love
  • [41] 73OCE2MC after much struggle, a brute-force undo
  • [42] OGUV4HSA remove some memory leaks from rendered fragments
  • [43] SPNMXTYR have file API operate on state object
  • [44] 3PSFWAIL Merge lines.love
  • [45] OTIBCAUJ love2d scaffold
  • [46] MD3W5IRA new fork: rip out drawing support
  • [47] VP5KC4XZ Merge lines.love
  • [48] 3XNFQDDN Merge lines.love
  • [49] AVTNUQYR basic test-enabled framework
  • [50] LXTTOB33 extract a couple of files
  • [51] K74U4BAU Merge lines.love
  • [52] 6LJZN727 handle chords
  • [53] CE4LZV4T drop last couple of manual tests
  • [54] U3MJNFUY Merge lines.love
  • [55] 2CTN2IEF Merge lines.love
  • [56] PJEQCTBL add state arg to Drawing.update
  • [57] FS2ITYYH record a known issue
  • [58] OI4FPFIN support drawings in the source editor
  • [59] JOPVPUSA editing source code from within the app
  • [60] REAIVN7W Merge lines.love
  • [61] B6DS4GZC Merge lines.love
  • [62] 66X36NZN a little more prose describing manual_tests
  • [63] AF253GHL bugfix
  • [64] KKMFQDR4 editing source code from within the app
  • [65] R2ASHK5C fix a bad merge
  • [66] KMSL74GA support selections in the source editor
  • [67] N2NUGNN4 include a brief reference enabling many useful apps

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]()
    or edit.invalid_cursor1(State)
    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
    if State.cursor1.line >= #State.lines then
    break
    end
    if State.lines[State.cursor1.line].mode == 'text' then
    break
    end
    State.cursor1.line = State.cursor1.line+1
    State.cursor1.pos = 1
    end
    end
    function edit.cursor_on_text(State)
    return State.cursor1.line <= #State.lines
    and State.lines[State.cursor1.line].mode == 'text'
    end
    or not edit.cursor_on_text(State)
    or not Text.le1(State.screen_top1, State.cursor1) then
    State.screen_top1 = {line=1, pos=1}
    State.cursor1 = {line=1, pos=1}
    edit.put_cursor_on_next_text_line(State)
  • replacement in source_edit.lua at line 114
    [6.205][6.205:250]()
    or edit.invalid1(State, State.cursor1)
    [6.205]
    [6.250]
    or edit.invalid_cursor1(State)
  • edit in source_edit.lua at line 118
    [6.391]
    [2.342]
    State.cursor1 = {line=1, pos=1}
  • edit in source_edit.lua at line 130
    [6.572]
    [6.572]
    -- 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
    end
  • replacement in source_edit.lua at line 147
    [2.454][2.454:656]()
    if State.cursor1.line >= #State.lines then
    break
    end
    if State.lines[State.cursor1.line].mode == 'text' then
    break
    end
    State.cursor1.line = State.cursor1.line+1
    State.cursor1.pos = 1
    [2.454]
    [6.18427]
    if State.cursor1.line >= #State.lines then
    break
    end
    if State.lines[State.cursor1.line].mode == 'text' then
    break
    end
    State.cursor1.line = State.cursor1.line+1
    State.cursor1.pos = 1
  • edit in edit.lua at line 79
    [6.472][6.919:955](),[6.955][2.1348:1348]()
    State.cursor1 = {line=1, pos=1}
  • resurrect zombie in edit.lua at line 79
    [6.472][3.66:102](),[6.472][3.66:102]()
    State.cursor1 = {line=1, pos=1}
  • edit in edit.lua at line 98
    [6.43][6.727:788](),[6.43][6.727:788](),[6.457][5.248:466](),[6.457][5.248:466]()
    if State.next_save and State.next_save < Current_time then
    if State.cursor1.line >= #State.lines then
    break
    end
    if State.lines[State.cursor1.line].mode == 'text' then
    break
    end
    State.cursor1.line = State.cursor1.line+1
    State.cursor1.pos = 1