merge bugfix

akkartik
Sep 1, 2024, 8:49 AM
3V2R6YS6W44U4EDPO5FVNNG5LV4ANB2EYSWC5VFFFR2OSTAVKWZAC

Dependencies

  • [2] PZYSWJZC resolve conflicts
  • [3] AVTNUQYR basic test-enabled framework
  • [4] FS2ITYYH record a known issue
  • [5] ORKN6EOB Merge lines.love
  • [6] 2DVVKKVA flesh out Readme
  • [7] D43U7GQ4 alter on-disk representation (manifest files)
  • [8] CZQ3NJ4N Merge text0
  • [9] PJ5PQAQE record support for multiple versions
  • [10] OTIBCAUJ love2d scaffold
  • [11] KKQKPGCI resolve conflicts
  • [12] 6LJZN727 handle chords
  • [13] 5SM6DRHK port inscript's bugfix to source editor
  • [14] QMRQL2FO resolve conflicts
  • [15] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [16] XX7G2FFJ intermingle freehand line drawings with text
  • [17] BULPIBEG beginnings of a module for the text editor
  • [18] EZHO4TSW new file-system format for freewheeling apps
  • [19] CAG7PP5Y Merge text.love
  • [20] PCHTG7YU resolve conflicts
  • [21] CRBLAWBO resolve conflicts
  • [22] KQ22RW43 resolve conflicts
  • [23] KMSL74GA support selections in the source editor
  • [24] R6MNUXDJ pijul bug
  • [25] TOXPJJYY resolve conflicts
  • [26] T4FRZSYL delete an ancient, unused file
  • [27] G3DLS5OU audit all asserts
  • [28] N2NUGNN4 include a brief reference enabling many useful apps
  • [29] ZLJYLPOT Merge lines.love
  • [30] LWPFEZBI Merge lines.love
  • [31] CE4LZV4T drop last couple of manual tests
  • [32] VHQCNMAR several more modules
  • [33] TLOAPLBJ add a license
  • [34] 5OVKHVY6 nice way to make on.* handlers more discoverable
  • [35] VSGPLJFA resolve conflicts
  • [36] ZS5IYZH5 stop caching screen_bottom1
  • [37] 52YBYUCO resolve conflicts
  • [38] 4YDBYBA4 clean up memory leak experiments
  • [39] MBAJPTDJ resolve conflicts
  • [40] JCRUUD2S Merge text.love
  • [41] RXMHAZ6V resolve conflicts
  • [42] SW5GN5LP suggest a default layout for freewheeling apps
  • [43] KJLZCK2R resolve conflicts
  • [44] JOPVPUSA editing source code from within the app
  • [45] K2X6G75Z start writing some tests for drawings
  • [46] SGMA5JLE save the list of tests in repo
  • [47] UEG224LH debug animations
  • [48] 3PSFWAIL Merge lines.love
  • [49] 66X36NZN a little more prose describing manual_tests
  • [50] VHUNJHXB Merge lines.love
  • [51] 4J3Y3DJW pijul bug: redo upstream change
  • [52] BLWAYPKV extract a module
  • [53] RSZD5A7G forgot to add json.lua
  • [54] 36Z442IV back to commit 8123959e52f without code editing
  • [55] 2CFLXLIE Merge text.love
  • [56] TVCPXAAU rename
  • [57] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [58] HWTLXESC Merge lines.love
  • [59] 6VJTQKW7 start supporting LÖVE v12
  • [60] FBBHEUQN resolve conflicts
  • [61] D2GCFTTT clean up repl functionality
  • [62] X43ZIKR3 Merge text.love
  • [63] QZUFJMD5 resolve conflicts
  • [64] OL7ZCZWD Merge text.love
  • [65] ED4Z6ORC cleaner API for file-system access
  • [66] 4Y2QDDAZ resolve conflicts
  • [67] LXTTOB33 extract a couple of files
  • [68] VXRYVZ74 Merge text.love
  • [69] 2L5MEZV3 experiment: new edit namespace
  • [70] KKMFQDR4 editing source code from within the app
  • [71] 3QNOKBFM beginnings of a test harness
  • [72] 6TBU3VTN explicitly state when operations manage undo
  • [73] D4B52CQ2 Merge lines.love
  • [74] 73OCE2MC after much struggle, a brute-force undo
  • [75] 57HKHZ7Z include the tool that's mentioned in representation.md
  • [76] TBTRYEBP Merge lines.love
  • [77] VP5KC4XZ Merge lines.love
  • [78] LRDM35CE app running again
  • [79] VLTU33KW resolve conflicts
  • [80] R5QXEHUI somebody stop me
  • [81] BDUAJA6T resolve conflicts
  • [82] OGUV4HSA remove some memory leaks from rendered fragments
  • [83] VXORMHME delete experimental REPL

Change contents

  • file deletion: source_select.lua (----------)source_select.lua (----------)
    [3.2][3.30050:30091](),[3.30091][3.23288:23288](),[3.2][3.30050:30091]()
    function Text.cut_selection_and_record_undo_event(State)
    Text.delete_selection_and_record_undo_event(State)
    function Text.delete_selection_and_record_undo_event(State)
    if State.selection1.line == nil then return end
    local minl,maxl = minmax(State.selection1.line, State.cursor1.line)
    local before = snapshot(State, minl, maxl)
    Text.delete_selection_without_undo(State)
    record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})
    end
    function Text.delete_selection_without_undo(State)
    if State.selection1.line == nil then return end
    -- min,max = sorted(State.selection1,State.cursor1)
    local minl,minp = State.selection1.line,State.selection1.pos
    local maxl,maxp = State.cursor1.line,State.cursor1.pos
    if minl > maxl then
    minl,maxl = maxl,minl
    minp,maxp = maxp,minp
    elseif minl == maxl then
    if minp > maxp then
    minp,maxp = maxp,minp
    end
    end
    -- update State.cursor1 and State.selection1
    State.cursor1.line = minl
    State.cursor1.pos = minp
    if Text.lt1(State.cursor1, State.screen_top1) then
    State.screen_top1.line = State.cursor1.line
    State.screen_top1.pos = Text.pos_at_start_of_screen_line(State, State.cursor1)
    end
    State.selection1 = {}
    -- delete everything between min (inclusive) and max (exclusive)
    Text.clear_screen_line_cache(State, minl)
    local min_offset = Text.offset(State.lines[minl].data, minp)
    local max_offset = Text.offset(State.lines[maxl].data, maxp)
    if minl == maxl then
    --? print('minl == maxl')
    State.lines[minl].data = State.lines[minl].data:sub(1, min_offset-1)..State.lines[minl].data:sub(max_offset)
    return
    end
    return result
    end
    if State.selection1.line == nil then return end
    local result = Text.selection(State)
  • file deletion: source_text.lua (----------)source_text.lua (----------)source_text.lua (----------)source_text.lua (----------)
    [3.2][3.147125:147164](),[3.2][3.147125:147164](),[3.147164][3.83786:83786](),[3.2][3.147125:147164](),[3.2][3.147125:147164]()
    Text.delete_selection_and_record_undo_event(State)
    Text.delete_selection_and_record_undo_event(State)
    schedule_save(State)
    return
    end
    schedule_save(State)
    return
    end
  • file deletion: source_edit.lua (----------)source_edit.lua (----------)source_edit.lua (----------)source_edit.lua (----------)
    [3.2][3.165788:165827](),[3.2][3.165788:165827](),[3.165827][3.152503:152503](),[3.2][3.165788:165827](),[3.2][3.165788:165827]()
    Drawing.before = nil
    Text.delete_selection_and_record_undo_event(State)
    local s = Text.cut_selection_and_record_undo_event(State)
    if s then
    end
    schedule_save(State)