Merge text.love

[?]
May 14, 2023, 12:34 AM
ZJFSVE47FYDOAPGKXNF6TNKD4Q2ESVYQBG4VBF54PQRA7FI2JSOAC

Dependencies

  • [2] 2CFLXLIE Merge text.love
  • [3] RAXUQQ6Z Merge lines.love
  • [4] TVCPXAAU rename
  • [5] BULPIBEG beginnings of a module for the text editor
  • [6] LXTTOB33 extract a couple of files
  • [7] TLOAPLBJ add a license
  • [8] ZLJYLPOT Merge lines.love
  • [9] Q6RXCILQ Merge text.love
  • [10] 2H76FV5S bugfix: searching files containing unicode
  • [11] LLAOOMUL bugfix: search upwards
  • [12] 2L5MEZV3 experiment: new edit namespace
  • [13] 2CTN2IEF Merge lines.love
  • [14] 4YDBYBA4 clean up memory leak experiments
  • [15] 3QNOKBFM beginnings of a test harness
  • [16] KMSL74GA support selections in the source editor
  • [17] 73OCE2MC after much struggle, a brute-force undo
  • [18] MUJTM6RE bring back a level of wrapping
  • [19] 2JBAEQHU Merge lines.love
  • [20] FS2ITYYH record a known issue
  • [21] T4FRZSYL delete an ancient, unused file
  • [22] AVTNUQYR basic test-enabled framework
  • [23] ECBDENZ4 Merge text.love
  • [24] N2NUGNN4 include a brief reference enabling many useful apps
  • [25] 66X36NZN a little more prose describing manual_tests
  • [26] VXORMHME delete experimental REPL
  • [27] CE4LZV4T drop last couple of manual tests
  • [28] K74U4BAU Merge lines.love
  • [29] 36Z442IV back to commit 8123959e52f without code editing
  • [30] C3GUE45I Merge text.love
  • [31] OGUV4HSA remove some memory leaks from rendered fragments
  • [32] JOPVPUSA editing source code from within the app
  • [33] KB7KTSCP Merge lines.love
  • [34] LF7BWEG4 group all editor globals
  • [35] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [36] VHQCNMAR several more modules
  • [37] MSOQI3A5 bugfix: check before cursor on same line
  • [38] ATQO62TF Merge lines.love
  • [39] VP5KC4XZ Merge lines.love
  • [40] 7PZ4CQFV search: transparently handle drawings everywhere
  • [41] R5QXEHUI somebody stop me
  • [42] 3PSFWAIL Merge lines.love
  • [43] EX43CDDI Merge text.love
  • [44] BLWAYPKV extract a module
  • [45] AMOPICKV bugfix: check after cursor on same line when searching upwards
  • [46] KKMFQDR4 editing source code from within the app
  • [47] VHUNJHXB Merge lines.love
  • [48] XX7G2FFJ intermingle freehand line drawings with text
  • [49] ORKN6EOB Merge lines.love
  • [50] KWIVKQQ7 Merge lines.love
  • [51] YDUIKWSF Merge text.love
  • [52] RSZD5A7G forgot to add json.lua
  • [53] MD3W5IRA new fork: rip out drawing support
  • [54] A4BSGS2C Merge lines.love
  • [55] K2X6G75Z start writing some tests for drawings
  • [56] QD4LOFQR Merge text.love
  • [57] O3WZWLYC Merge text.love
  • [58] QSKWIEU3 support special chars like '(' in search
  • [59] MVFQNLLI Merge text.love
  • [60] 6LJZN727 handle chords
  • [61] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [62] JZR3QMTN Merge lines.love
  • [63] 5ZA3BRNY add state arg to a few functions
  • [64] JCXL74WV bring back everything from commit a68647ae22
  • [65] ZTZOO2OQ Merge lines.love
  • [66] D2GCFTTT clean up repl functionality
  • [67] EETIR4GX bugfix: skip over drawings when searching
  • [68] OTIBCAUJ love2d scaffold
  • [69] UAYCSFSK Merge text.love
  • [70] PJ5PQAQE record support for multiple versions

Change contents

  • file deletion: source_text_tests.lua (----------)source_text_tests.lua (----------)
    [4.2][4.83739:83784](),[4.2][4.83739:83784](),[4.83784][4.3561:3561]()
    check_eq(Editor_state.cursor1.pos, 6, '1/cursor:pos')
    end
    Editor_state.lines = load_array{'abc ’abd'} -- contains unicode quote
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=1, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
    edit.draw(Editor_state)
    -- search upwards for a string
    edit.run_after_keychord(Editor_state, 'C-f')
    check_eq(Editor_state.cursor1.pos, 2, '1/cursor:pos')
    end
    function test_search_wrap_upwards()
    Editor_state.cursor1 = {line=2, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
    edit.draw(Editor_state)
    -- search for a string
    edit.run_after_keychord(Editor_state, 'C-f')
    Editor_state.lines = load_array{'’abc', 'def'} -- contains unicode quote in first line
    Text.redraw_all(Editor_state)
    check_eq(Editor_state.cursor1.pos, 2, '2/cursor:pos')
    end
    function test_search_wrap()
    Editor_state.cursor1 = {line=2, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
    edit.draw(Editor_state)
    -- search for a string
    edit.run_after_keychord(Editor_state, 'C-f')
    Editor_state.lines = load_array{'’abc', 'abd'} -- contains unicode quote
    Text.redraw_all(Editor_state)
    check_eq(Editor_state.cursor1.pos, 2, '2/cursor:pos')
    end
    function test_search_upwards()
    Editor_state.lines = load_array{'```lines', '```', 'def', 'ghi', '’deg'} -- contains unicode quote in final line
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=1, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
    edit.draw(Editor_state)
    -- search for a string
    edit.run_after_keychord(Editor_state, 'C-f')
  • edit in search.lua at line 21
    [4.758][4.1036:1151](),[4.758][4.1036:1151]()
    local pos = find(State.lines[State.cursor1.line].data, State.search_term, State.cursor1.pos, --[[literal]] true)
  • edit in search.lua at line 31
    [4.211][4.1152:1251](),[4.211][4.1152:1251](),[4.219][4.1252:1294](),[4.219][4.1252:1294]()
    pos = find(State.lines[i].data, State.search_term, --[[from start]] nil, --[[literal]] true)
    State.cursor1 = {line=i, pos=pos}
  • edit in search.lua at line 42
    [4.368][4.1295:1394](),[4.368][4.1295:1394](),[4.50207][4.1395:1437](),[4.50207][4.1395:1437]()
    pos = find(State.lines[i].data, State.search_term, --[[from start]] nil, --[[literal]] true)
    State.cursor1 = {line=i, pos=pos}
  • edit in search.lua at line 52
    [4.833][4.1438:1552]()
    pos = find(State.lines[State.cursor1.line].data, State.search_term, --[[from start]] nil, --[[literal]] true)
  • edit in search.lua at line 74
    [4.800][4.1553:1671](),[4.800][4.1553:1671]()
    local pos = rfind(State.lines[State.cursor1.line].data, State.search_term, State.cursor1.pos-1, --[[literal]] true)
  • edit in search.lua at line 84
    [4.1238][4.1672:1770](),[4.1238][4.1672:1770](),[4.51016][4.1771:1813](),[4.51016][4.1771:1813]()
    pos = rfind(State.lines[i].data, State.search_term, --[[from end]] nil, --[[literal]] true)
    State.cursor1 = {line=i, pos=pos}
  • edit in search.lua at line 95
    [4.1411][4.1814:1912](),[4.1411][4.1814:1912](),[4.51247][4.1913:1955](),[4.51247][4.1913:1955]()
    pos = rfind(State.lines[i].data, State.search_term, --[[from end]] nil, --[[literal]] true)
    State.cursor1 = {line=i, pos=pos}
  • edit in search.lua at line 105
    [4.910][4.1956:2069]()
    pos = rfind(State.lines[State.cursor1.line].data, State.search_term, --[[from end]] nil, --[[literal]] true)