simpler implementation of bugfix #2

akkartik
Oct 30, 2024, 3:25 AM
F5KCYFOYPMHBNSPS2G6IF3HCSHABOSWQVM3Z7BZKHZ36TJBVJ5GQC

Dependencies

  • [2] OXIU3SJ2 bugfix #3, attempt #2 in search UI
  • [3] O7YTBRQY bugfix: restart search on backspace
  • [4] 2L5MEZV3 experiment: new edit namespace
  • [5] KKMFQDR4 editing source code from within the app
  • [6] NVSC4N4K change a helper slightly
  • [7] 4FTOQOPZ bugfix #2 in search UI
  • [8] IENTL2IT indent

Change contents

  • edit in source_edit.lua at line 148
    [3.1079][3.1079:1184](),[3.1184][3.59:79](),[3.59][3.59:79](),[3.79][3.1185:1384]()
    if State.lines[line].mode == 'text' then
    State.cursor1.line = line
    State.cursor1.pos = 1
    break
    end
    end
    end
    function edit.put_cursor_on_next_text_line_wrapping_around_if_necessary(State)
    local line = State.cursor1.line
    local max = #State.lines
    for _ = 1, max-1 do
    line = (line+1) % max
  • edit in source_edit.lua at line 153
    [3.158][3.1490:1818]()
    end
    end
    function edit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)
    local cursor_line = State.lines[State.cursor1.line].data
    if State.cursor1.pos <= utf8.len(cursor_line) then
    State.cursor1.pos = State.cursor1.pos + 1
    else
    edit.put_cursor_on_next_text_line_wrapping_around_if_necessary(State)
  • replacement in source_edit.lua at line 414
    [3.1045][3.1045:1122]()
    edit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)
    [3.1045]
    [3.1122]
    Text.right(State)
  • edit in edit.lua at line 146
    [3.2150][3.2150:2255](),[3.2255][3.295:315](),[3.295][3.295:315](),[3.315][3.2256:2455]()
    if State.lines[line].mode == 'text' then
    State.cursor1.line = line
    State.cursor1.pos = 1
    break
    end
    end
    end
    function edit.put_cursor_on_next_text_line_wrapping_around_if_necessary(State)
    local line = State.cursor1.line
    local max = #State.lines
    for _ = 1, max-1 do
    line = (line+1) % max
  • edit in edit.lua at line 151
    [3.394][3.2561:2889]()
    end
    end
    function edit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)
    local cursor_line = State.lines[State.cursor1.line].data
    if State.cursor1.pos <= utf8.len(cursor_line) then
    State.cursor1.pos = State.cursor1.pos + 1
    else
    edit.put_cursor_on_next_text_line_wrapping_around_if_necessary(State)
  • replacement in edit.lua at line 408
    [2.72][2.72:149]()
    edit.put_cursor_on_next_text_loc_wrapping_around_if_necessary(State)
    [2.72]
    [2.149]
    Text.right(State)