resolve conflicts

akkartik
Jun 11, 2024, 7:55 PM
MPLM5UH7A4SBA5O7KM42GSRKVG7MZ6H6CETAXMTDIZP4PJFLIYIAC

Dependencies

  • [2] 4NFSODHH Merge text0
  • [3] OV6FE23R Merge text0
  • [4] BTX7AFAI merge bugfix
  • [5] 2O4OXP5X comment
  • [6] CRBLAWBO resolve conflicts
  • [7] 4WAFGF4Z selection bugfix
  • [8] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [9] Y2ZIPXEM new test
  • [10] IFTYOERM line.y -> line_cache.starty in a few more places
  • [11] VG75U7IM bugfix: typing should delete highlighted text
  • [12] LNUHQOGH start passing in Editor_state explicitly
  • [13] 4EGQRXDA bugfix: naming points
  • [14] NSHI3CH5 Merge text0
  • [15] 7EQLPB3O bugfix: don't delete selection when moving cursor
  • [16] R2ASHK5C fix a bad merge
  • [17] ZS5IYZH5 stop caching screen_bottom1
  • [18] G2SVT3RO Merge text0
  • [19] UHB4GARJ left/right margin -> left/right coordinates
  • [20] ILOA5BYF separate data structure for each line's cache data
  • [21] ZLJGZYQG select text with shift + mouseclick
  • [22] LLAOOMUL bugfix: search upwards
  • [23] 7RKFA3VA failing test now looks realistic
  • [24] 5ZCQGZP5 save 2 more alternate formats for test failures
  • [25] MSOQI3A5 bugfix: check before cursor on same line
  • [26] 4GYPLUDY streamline the interface for Text.draw
  • [27] WAR3HXHT test both ways of selecting text with mouse
  • [28] 3ZSUBI57 drop some redundant args from Text.draw
  • [29] S2YQBEYC snapshot: test for a new regression
  • [30] RMKMPFT5 fix a corner case when selecting text
  • [31] CIQN2MDE bugfix: typing a capital letter deletes selection
  • [32] Y4SPXCM3 bugfix: pagedown was sometimes bouncing up
  • [33] GZ2OYPSH configurable colors and cursor in editor widget
  • [34] CYGNFOA5 Merge text0
  • [35] CVSRHMJ2 experiment: slightly adaptive scrolling
  • [36] TSV3KPBR tweak format of test failures
  • [37] I64IPGJX avoid saving fragments in lines
  • [38] 6RYLD5ON change how we handle clicks above top margin
  • [39] YFW4MNNP handle wrapping lines
  • [40] ORRSP7FV deduce test names on failures
  • [41] 2TCIWW6Z stop caching starty
  • [42] 3QMTXKWN rename
  • [43] LF7BWEG4 group all editor globals
  • [44] FZBXBUFF bugfix: search
  • [45] EMHRPJ3R no, that's not right
  • [46] 2JLVAYHB start decoupling editor tests from App
  • [47] UFOVVX3Z Merge text0
  • [48] BW2IUB3K keep all text cache writes inside text.lua
  • [49] GJ4LBCIE streamline button.lua
  • [50] 6XCJX4DZ bugfix: inscript's bug
  • [51] 2CTN2IEF Merge lines.love
  • [52] CZQ3NJ4N Merge text0
  • [53] P6SYWBLB remove a duplicate test
  • [54] KMRJOSLY bugfix: delete selection before pasting
  • [55] HLIF3YQE Merge text0
  • [56] APYPFFS3 call edit rather than App callbacks in tests
  • [57] QKAMUWSB another bugfix in scrolling while inserting text
  • [58] AMOPICKV bugfix: check after cursor on same line when searching upwards
  • [59] A3Z3S62K get rid of dubious heuristic helper
  • [60] 36Z442IV back to commit 8123959e52f without code editing
  • [*] LXTTOB33 extract a couple of files
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] PLKNHYZ4 extract a function
  • [*] 2L5MEZV3 experiment: new edit namespace
  • [*] 3QNOKBFM beginnings of a test harness

Change contents

  • resurrect zombie in text_tests.lua at line 231
    [7.7400][7.4:35](),[7.7400][7.4:35]()
    Editor_state.selection1 = {}
  • replacement in text_tests.lua at line 232
    [7.35][7.35:142](),[7.35][7.35:142]()
    edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cache
    [7.35]
    [7.142]
    edit.draw(Editor_state, Text_color) -- populate line_cache.startpos for each line
  • resurrect zombie in text_tests.lua at line 321
    [7.8381][7.821:859](),[7.8381][7.821:859]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 337
    [7.8755][7.860:898](),[7.8755][7.860:898]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 353
    [7.9128][7.899:937](),[7.9128][7.899:937]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 405
    [7.9503][7.1016:1054](),[7.9503][7.1016:1054]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 422
    [7.9917][7.1055:1093](),[7.9917][7.1055:1093]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 440
    [7.10286][7.1094:1132](),[7.10286][7.1094:1132]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 462
    [7.10831][7.1133:1171](),[7.10831][7.1133:1171]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 482
    [7.11418][7.1172:1210](),[7.11418][7.1172:1210]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 505
    [7.12004][7.1211:1249](),[7.12004][7.1211:1249]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 529
    [7.12594][7.1250:1288](),[7.12594][7.1250:1288]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 547
    [7.13018][7.1289:1327](),[7.13018][7.1289:1327]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 569
    [7.13628][7.1328:1366](),[7.13628][7.1328:1366]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 586
    [7.14133][7.1367:1405](),[7.14133][7.1367:1405]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 602
    [7.14508][7.1406:1444](),[7.14508][7.1406:1444]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 623
    [7.14995][7.1445:1483](),[7.14995][7.1445:1483]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 640
    [7.15369][7.1484:1522](),[7.15369][7.1484:1522]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 657
    [7.15736][7.1523:1561](),[7.15736][7.1523:1561]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 675
    [7.16093][7.1562:1600](),[7.16093][7.1562:1600]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 698
    [7.16691][7.1601:1639](),[7.16691][7.1601:1639]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 716
    [7.17134][7.1640:1678](),[7.17134][7.1640:1678]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 760
    [7.18618][7.1679:1717](),[7.18618][7.1679:1717]()
    edit.draw(Editor_state, Text_color)
  • replacement in text_tests.lua at line 789
    [7.20197][7.1826:1933](),[7.20197][5.76:149]()
    edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cache
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    [7.20197]
    [7.2]
    edit.draw(Editor_state, Text_color) -- populate line_cache.startpos for each line
  • replacement in text_tests.lua at line 808
    [7.497][7.2:109](),[7.497][7.196:269]()
    edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cache
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    [7.497]
    [7.592]
    edit.draw(Editor_state, Text_color) -- populate line_cache.startpos for each line
  • replacement in text_tests.lua at line 820
    [7.215][7.215:390](),[7.425][7.425:467](),[7.467][4.2:40](),[7.26][7.467:761](),[4.40][7.467:761](),[7.467][7.467:761]()
    Editor_state.lines = load_array{'abc', 'defgh', 'xyz'}
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=2, pos=5}
    Editor_state.screen_top1 = {line=2, pos=3}
    -- press mouse above first line of text
    edit.draw(Editor_state, Text_color)
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1)
    -- selection is at screen top
    check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')
    check_eq(Editor_state.selection1.line, 2, 'selection:line')
    check_eq(Editor_state.selection1.pos, 3, 'selection:pos')
    [7.215]
    [7.761]
    Editor_state.lines = load_array{'abc', 'defgh', 'xyz'}
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=2, pos=5}
    Editor_state.screen_top1 = {line=2, pos=3}
    -- press mouse above first line of text
    edit.draw(Editor_state, Text_color)
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1)
    -- selection is at screen top
    check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')
    check_eq(Editor_state.selection1.line, 2, 'selection:line')
    check_eq(Editor_state.selection1.pos, 3, 'selection:pos')
  • edit in text_tests.lua at line 834
    [7.62][7.62:685]()
    -- I'd like to test what happens when a mouse click is below some page of
    -- text, potentially even in the middle of a line.
    -- However, it's brittle to set up a text line boundary just right.
    -- So I'm going to just check things below the bottom of the final line of
    -- text when it's in the middle of the screen.
    -- final screen line ends in the middle of screen
    App.screen.init{width=50, height=60}
    Editor_state = edit.initialize_test_state()
    Editor_state.lines = load_array{'abcde'}
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=1, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
  • resurrect zombie in text_tests.lua at line 834
    [7.720][7.110:148](),[7.720][7.110:148]()
    edit.draw(Editor_state, Text_color)
  • edit in text_tests.lua at line 834
    [7.62]
    [7.110]
    -- I'd like to test what happens when a mouse click is below some page of
    -- text, potentially even in the middle of a line.
    -- However, it's brittle to set up a text line boundary just right.
    -- So I'm going to just check things below the bottom of the final line of
    -- text when it's in the middle of the screen.
    -- final screen line ends in the middle of screen
    App.screen.init{width=50, height=60}
    Editor_state = edit.initialize_test_state()
    Editor_state.lines = load_array{'abcde'}
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=1, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
  • replacement in text_tests.lua at line 867
    [7.21125][7.1934:2041](),[7.21125][7.270:343]()
    edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cache
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    [7.21125]
    [7.581]
    edit.draw(Editor_state, Text_color) -- populate line_cache.startpos for each line
  • replacement in text_tests.lua at line 891
    [7.22267][7.2042:2149](),[7.22267][7.344:417]()
    edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cache
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    [7.22267]
    [7.446]
    edit.draw(Editor_state, Text_color) -- populate line_cache.startpos for each line
  • resurrect zombie in text_tests.lua at line 919
    [7.357][7.149:187](),[7.357][7.149:187]()
    edit.draw(Editor_state, Text_color)
  • edit in text_tests.lua at line 969
    [7.25425][7.2228:2266](),[7.25425][7.2228:2266]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 979
    [7.26449][7.2267:2305](),[7.26449][7.2267:2305]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1013
    [7.443][7.2306:2344](),[7.443][7.2306:2344]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1056
    [7.27840][7.2384:2422](),[7.27840][7.2384:2422]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1083
    [7.28590][7.2423:2461](),[7.28590][7.2423:2461]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1111
    [7.29464][7.2462:2500](),[7.29464][7.2462:2500]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1138
    [7.30422][7.2501:2539](),[7.30422][7.2501:2539]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1171
    [7.31681][7.2540:2578](),[7.31681][7.2540:2578]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1199
    [7.32336][7.2579:2617](),[7.32336][7.2579:2617]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1226
    [7.33078][7.2618:2656](),[7.33078][7.2618:2656]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1253
    [7.34012][7.2657:2695](),[7.34012][7.2657:2695]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1282
    [7.34926][7.2696:2734](),[7.34926][7.2696:2734]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1332
    [7.36217][7.2774:2812](),[7.36217][7.2774:2812]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1360
    [7.37150][7.2813:2851](),[7.37150][7.2813:2851]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1386
    [7.37982][7.2852:2890](),[7.37982][7.2852:2890]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1414
    [7.38826][7.2891:2929](),[7.38826][7.2891:2929]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1436
    [7.39626][7.2930:2968](),[7.39626][7.2930:2968]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1454
    [7.40403][7.2969:3007](),[7.40403][7.2969:3007]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1598
    [7.44748][7.3164:3202](),[7.44748][7.3164:3202]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1631
    [7.45611][7.3203:3241](),[7.45611][7.3203:3241]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1658
    [7.46337][7.3242:3280](),[7.46337][7.3242:3280]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1864
    [7.53740][7.3320:3358](),[7.53740][7.3320:3358]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1884
    [7.355][7.3359:3397](),[7.355][7.3359:3397]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1910
    [7.353][7.3398:3436](),[7.353][7.3398:3436]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1927
    [7.344][7.3437:3475](),[7.344][7.3437:3475]()
    edit.draw(Editor_state, Text_color)
  • resurrect zombie in text_tests.lua at line 1944
    [7.364][7.3476:3514](),[7.364][7.3476:3514]()
    edit.draw(Editor_state, Text_color)
  • edit in text_tests.lua at line 1953
    [7.171][5.2:75](),[7.171][5.2:75]()
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
  • resolve order conflict in text_tests.lua at line 1953
    [7.756]
  • edit in text.lua at line 10
    [7.91][7.3:83](),[7.91][7.3:83]()
    -- return y for the next line, and position of start of final screen line drawn
  • resurrect zombie in text.lua at line 10
    [7.83][7.5:73](),[7.83][7.5:73]()
    function Text.draw(State, line_index, y, startpos, fg, hide_cursor)
  • edit in text.lua at line 10
    [7.91]
    [7.5]
    -- return y for the next line
  • edit in text.lua at line 12
    [7.73]
    [7.42]
    --? print('text.draw', line_index, y)
  • edit in text.lua at line 1016
    [7.91][7.0:30](),[7.91][7.0:30]()
    -- return y for the next line
  • resolve order conflict in text.lua at line 1016
    [64.442]
  • replacement in edit.lua at line 124
    [7.1000][3.59:146](),[7.1000][6.8910:8960]()
    y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, fg, hide_cursor)
    y = Text.draw(State, line_index, y, startpos)
    [7.1000]
    [7.1070]
    y = Text.draw(State, line_index, y, startpos, fg, hide_cursor)
  • resurrect zombie in edit.lua at line 378
    [7.10318][3.562:610](),[7.10318][3.562:610]()
    Text.keychord_press(State, chord, readonly)
  • replacement in edit.lua at line 432
    [7.11811][6.9169:9188]()
    edit.draw(State)
    [7.11811]
    [7.11811]
    edit.draw(State, Text_color)
  • resolve order conflict in app.lua at line 234
    [2.748]
    [7.8666]
  • edit in app.lua at line 546
    [7.60904][7.8793:8925](),[7.60904][7.8793:8925](),[7.60904][7.8793:8925](),[7.61148][7.8926:8978](),[7.61148][7.8926:8978](),[7.61148][7.8926:8978]()
    local stack_trace = debug.traceback('', --[[stack frame]]5) -- most likely to be useful, but set to 0 for a complete stack trace
    -- uncomment this line for a complete stack trace