change a helper slightly

[?]
Sep 15, 2023, 3:46 PM
NVSC4N4KMUHGX5FEOM2DXYA4VHEEQTP3QNY3D7WY4UONVW5LCT2QC

Dependencies

  • [2] 7VGDIPLC more robust state validation
  • [3] IX5YTLSV state validation in source editor as well
  • [4] ERQKFTPV extract method
  • [5] SW7BSBMJ several bugfixes in saving/loading cursor position
  • [6] AF253GHL bugfix
  • [7] QQBP3G6W return height of editor widget after drawing
  • [8] OI4FPFIN support drawings in the source editor
  • [9] B4JEWKWI hide editor cursor while in file navigator
  • [10] 2L5MEZV3 experiment: new edit namespace
  • [11] LIKTH6HM update stale source X-(
  • [12] LNUHQOGH start passing in Editor_state explicitly
  • [13] 5STHSG4U remove some duplication
  • [14] KKMFQDR4 editing source code from within the app

Change contents

  • replacement in source_edit.lua at line 118
    [3.391][3.391:437]()
    edit.put_cursor_on_first_text_line(State)
    [3.391]
    [3.437]
    edit.put_cursor_on_next_text_line(State)
  • replacement in source_edit.lua at line 134
    [3.714][3.714:765](),[3.765][4.19757:19828](),[4.19757][4.19757:19828](),[4.19828][3.766:804](),[3.804][4.19857:19877](),[4.19857][4.19857:19877]()
    function edit.put_cursor_on_first_text_line(State)
    for i,line in ipairs(State.lines) do
    if line.mode == 'text' then
    State.cursor1 = {line=i, pos=1}
    break
    end
    [3.714]
    [4.19877]
    function edit.put_cursor_on_next_text_line(State)
    while true do
    if State.cursor1.line >= #State.lines then
    break
  • edit in source_edit.lua at line 139
    [4.19883]
    [4.19883]
    if State.lines[State.cursor1.line].mode == 'text' then
    break
    end
    State.cursor1.line = State.cursor1.line+1
    State.cursor1.pos = 1
    end
  • replacement in edit.lua at line 116
    [2.472][2.472:518]()
    edit.put_cursor_on_first_text_line(State)
    [2.472]
    [2.518]
    edit.put_cursor_on_next_text_line(State)
  • replacement in edit.lua at line 142
    [2.795][2.795:846](),[2.846][4.221:292](),[4.123][4.221:292](),[4.292][2.847:885](),[2.885][4.321:333](),[4.321][4.321:333](),[4.333][4.347:355](),[4.347][4.347:355]()
    function edit.put_cursor_on_first_text_line(State)
    for i,line in ipairs(State.lines) do
    if line.mode == 'text' then
    State.cursor1 = {line=i, pos=1}
    break
    end
    [2.795]
    [4.355]
    function edit.put_cursor_on_next_text_line(State)
    while true do
    if State.cursor1.line >= #State.lines then
    break
  • edit in edit.lua at line 147
    [4.361]
    [4.361]
    if State.lines[State.cursor1.line].mode == 'text' then
    break
    end
    State.cursor1.line = State.cursor1.line+1
    State.cursor1.pos = 1
    end