extract method

[?]
Jul 24, 2022, 6:36 AM
ERQKFTPVWZO4WJD2WRIV33JWTWZSF4HNTK2GD7QT5I5TIL3SOGKQC

Dependencies

  • [2] ILOA5BYF separate data structure for each line's cache data
  • [3] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [4] AVQ5MC5D finish uppercasing all globals
  • [5] LF7BWEG4 group all editor globals
  • [6] O6T3TPXD bugfix: position cursor up top when loading file
  • [7] YGCT2D2O start loading settings as applicable
  • [8] WQOSZSUE warn on unused commandline args
  • [9] PWHZPJJM always show current filename in window title
  • [10] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [11] W4UVZETR 2 regressions:
  • [12] VO3GEIRW use app name in window title
  • [13] G5HANZBI bugfix
  • [14] Z4KNS42N to open a file without a terminal, drag it on!
  • [*] OTIBCAUJ love2d scaffold
  • [*] 2L5MEZV3 experiment: new edit namespace
  • [*] LNUHQOGH start passing in Editor_state explicitly

Change contents

  • replacement in main.lua at line 45
    [3.85498][3.85498:85546](),[3.85546][3.285:319](),[3.285][3.285:319](),[3.319][3.85547:85585](),[3.85585][3.344:376](),[3.344][3.344:376]()
    for i,line in ipairs(Editor_state.lines) do
    if line.mode == 'text' then
    Editor_state.cursor1.line = i
    break
    end
    end
    [3.85498]
    [3.376]
    edit.fixup_cursor(Editor_state)
  • replacement in main.lua at line 49
    [2.7698][3.85649:85823](),[3.85649][3.85649:85823](),[3.85823][3.504:540](),[3.504][3.504:540](),[3.540][3.85824:85864](),[3.85864][3.567:605](),[3.567][3.567:605](),[3.15][3.452:460](),[3.605][3.452:460](),[3.690][3.452:460](),[3.452][3.452:460]()
    if Editor_state.cursor1.line > #Editor_state.lines or Editor_state.lines[Editor_state.cursor1.line].mode ~= 'text' then
    for i,line in ipairs(Editor_state.lines) do
    if line.mode == 'text' then
    Editor_state.cursor1.line = i
    break
    end
    end
    end
    [2.7698]
    [3.460]
    edit.fixup_cursor(Editor_state)
  • edit in edit.lua at line 121
    [17.3868]
    [18.2701]
    function edit.fixup_cursor(State)
    if State.cursor1.line > #State.lines or State.lines[State.cursor1.line].mode ~= 'text' then
    for i,line in ipairs(State.lines) do
    if line.mode == 'text' then
    State.cursor1.line = i
    break
    end
    end
    end
    end