bugfix: skip over drawings when searching

[?]
Jul 25, 2022, 4:49 PM
EETIR4GXZBA5DEXUQKI6XMC22SFHZIYTZRR4U6BW6BT3RZA32FHQC

Dependencies

Change contents

  • replacement in text_tests.lua at line 1973
    [2.140][2.140:202]()
    Editor_state.lines = load_array{'abc', 'def', 'ghi', 'deg'}
    [2.140]
    [2.202]
    Editor_state.lines = load_array{'```lines', '```', 'def', 'ghi', 'deg'}
  • edit in text_tests.lua at line 1979
    [2.381][2.381:678]()
    local y = Editor_state.top
    App.screen.check(y, 'abc', 'F - test_search/baseline/screen:1')
    y = y + Editor_state.line_height
    App.screen.check(y, 'def', 'F - test_search/baseline/screen:2')
    y = y + Editor_state.line_height
    App.screen.check(y, 'ghi', 'F - test_search/baseline/screen:3')
  • edit in text_tests.lua at line 1987
    [2.1051]
    [2.1051]
    Editor_state.screen_top1 = {line=1, pos=1}
  • edit in search.lua at line 25
    [3.39]
    [3.49731]
    local pos
  • replacement in search.lua at line 27
    [3.49756][3.40:134](),[3.134][3.49826:49840](),[3.82231][3.49826:49840](),[3.49826][3.49826:49840](),[3.49840][3.135:163]()
    local pos = State.lines[State.cursor1.line].data:find(State.search_term, State.cursor1.pos)
    if pos then
    State.cursor1.pos = pos
    [3.49756]
    [3.49862]
    local line = State.lines[State.cursor1.line]
    if line.mode == 'text' then
    pos = line.data:find(State.search_term, State.cursor1.pos)
    if pos then
    State.cursor1.pos = pos
    end
  • replacement in search.lua at line 36
    [3.211][3.211:267](),[3.267][3.49968:49986](),[3.82399][3.49968:49986](),[3.49968][3.49968:49986](),[3.49986][3.268:331](),[3.331][3.50037:50051](),[3.82477][3.50037:50051](),[3.50037][3.50037:50051]()
    pos = State.lines[i].data:find(State.search_term)
    if pos then
    State.cursor1.line = i
    State.cursor1.pos = pos
    break
    [3.211]
    [3.50051]
    local line = State.lines[i]
    if line.mode == 'text' then
    pos = State.lines[i].data:find(State.search_term)
    if pos then
    State.cursor1.line = i
    State.cursor1.pos = pos
    break
    end