resolve conflicts

akkartik
Jun 11, 2024, 8:06 PM
5QQKIYB7UD2ULRUYWCIOU5W463S26YW4PKYQAZAXFUYRHV5HV66AC

Dependencies

  • [2] UPQJIFDP hide file numbers in output editor
  • [3] GSZOSB6Y bugfix: keep wrapping lines within window boundaries
  • [4] MPLM5UH7 resolve conflicts
  • [5] ICS45BIL editor widget now takes a bottom margin
  • [6] 3ZSUBI57 drop some redundant args from Text.draw
  • [7] LF7BWEG4 group all editor globals
  • [8] 4GYPLUDY streamline the interface for Text.draw
  • [9] 2TCIWW6Z stop caching starty
  • [10] ELJNEPW2 simplify cursor-on-screen check
  • [11] G2SVT3RO Merge text0
  • [12] I64IPGJX avoid saving fragments in lines
  • [13] FKNXK2OA switch to line index in a function
  • [14] EKKFWP4D bugfix: couple of margin-relative computations
  • [15] QLTJG7Q3 indent
  • [16] QCPXQ2E3 add state arg to a few functions
  • [17] UHB4GARJ left/right margin -> left/right coordinates
  • [18] SDEY7LFJ rename a variable
  • [19] PWTRH67V Merge lines.love
  • [20] MXA3RZYK deduce left/right from state where possible
  • [21] ZPUQSPQP extract a few methods
  • [22] 5OALPNN3 add args to some functions
  • [23] BW2IUB3K keep all text cache writes inside text.lua
  • [24] CUFW4EJL reorganize app.lua and its comments
  • [25] OV6FE23R Merge text0
  • [26] ZS5IYZH5 stop caching screen_bottom1
  • [27] HALS7E5U more clearly skip prints before screen top
  • [28] R2ASHK5C fix a bad merge
  • [29] KOYAJWE4 extract a couple more methods
  • [30] NSM73TX3 crap, fix some final changes in the source editor
  • [31] GCEF4N3V stop repeatedly checking for line wrapping
  • [32] 4NFSODHH Merge text0
  • [33] 36Z442IV back to commit 8123959e52f without code editing
  • [34] 2CTN2IEF Merge lines.love
  • [35] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [36] MZ3DMYPD start sketching out a scrollbar
  • [37] KZ5GAYRP this fixes the immediate regression
  • [38] Z5HLXU4P add state arg to a few functions
  • [39] CRBLAWBO resolve conflicts
  • [40] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] 2L5MEZV3 experiment: new edit namespace
  • [*] 3QNOKBFM beginnings of a test harness

Change contents

  • resurrect zombie in text.lua at line 10
    [5.91][4.1564:1594](),[5.91][4.1564:1594]()
    -- return y for the next line
  • edit in text.lua at line 11
    [4.1594][5.5:73](),[5.83][5.5:73](),[5.83][5.5:73](),[5.73][4.1595:1635](),[5.73][4.1595:1635]()
    function Text.draw(State, line_index, y, startpos, fg, hide_cursor)
    --? print('text.draw', line_index, y)
  • resurrect zombie in text.lua at line 11
    [5.83][2.4:91](),[5.83][2.4:91](),[5.83][2.4:91]()
    function Text.draw(State, line_index, y, startpos, fg, hide_cursor, show_line_numbers)
  • resolve order conflict in text.lua at line 11
    [4.1594]
    [2.4]
  • edit in text.lua at line 12
    [2.91]
    [5.42]
    --? print('text.draw', line_index, y)
  • edit in text.lua at line 31
    [5.363][5.0:19](),[5.363][5.0:19]()
    --? print(i)
  • replacement in text.lua at line 397
    [5.34][5.1186:1250](),[5.1186][5.1186:1250]()
    if y + State.line_height > App.screen.height then break end
    [5.34]
    [5.1250]
    if y + State.line_height > State.bottom then break end
  • edit in text.lua at line 406
    [5.485][5.220:265](),[5.485][5.220:265]()
    local y = State.bottom - State.line_height
  • resurrect zombie in text.lua at line 406
    [5.115][5.707:816](),[5.115][5.707:816]()
    -- does not modify State (except to populate line_cache)
    local loc2 = Text.to2(State, State.screen_top1)
  • edit in text.lua at line 408
    [5.816]
    [5.16685]
    local y = State.bottom - State.line_height
  • replacement in text.lua at line 432
    [5.96][5.1779:1843](),[5.1779][5.1779:1843]()
    if y + State.line_height > App.screen.height then break end
    [5.96]
    [5.1843]
    if y + State.line_height > State.bottom then break end
  • edit in text.lua at line 967
    [5.5776][5.368:468](),[5.5776][5.368:468]()
    pos=Text.to_pos_on_line(State, State.screen_bottom1.line, State.right-5, State.bottom-5),
  • resurrect zombie in edit.lua at line 122
    [5.738][5.596:655](),[5.738][5.596:655]()
    if y + State.line_height > State.bottom then break end
  • replacement in edit.lua at line 128
    [5.1000][2.803:909](),[5.1000][4.1649:1716]()
    y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, fg, hide_cursor, show_line_numbers)
    y = Text.draw(State, line_index, y, startpos, fg, hide_cursor)
    [5.1000]
    [5.1070]
    y = Text.draw(State, line_index, y, startpos, fg, hide_cursor, show_line_numbers)
  • replacement in app.lua at line 255
    [5.748][3.73:117]()
    --? App.screen.init{width=120, height=60}
    [5.748]
    [3.117]
    --? App.screen.init{width=120, height=60} -- debug: run a single test at a time like these 4 lines
  • edit in app.lua at line 259
    [5.748][4.1755:1755](),[4.1755][5.8666:8755](),[5.842][5.8666:8755](),[5.8755][5.310:345]()
    --? App.initialize_for_test() -- debug: run a single test at a time like these 2 lines
    --? test_click_below_all_lines()
  • resolve order conflict in app.lua at line 259
    [3.255]
    [5.842]
  • replacement in 0035-compute_scrollbar at line 6
    [5.2199][5.2199:2280]()
    local bot = state.line_cache[state.screen_bottom1.line].start_screen_line_index
    [5.2199]
    [5.2280]
    local screen_bottom1 = Text.screen_bottom1(state)
    local bot = state.line_cache[screen_bottom1.line].start_screen_line_index