bugfix: skip over drawings when searching
[?]
Jul 25, 2022, 4:49 PM
EETIR4GXZBA5DEXUQKI6XMC22SFHZIYTZRR4U6BW6BT3RZA32FHQCDependencies
- [2]
FZBXBUFFbugfix: search - [3]
LXTTOB33extract a couple of files - [4]
5ZA3BRNYadd state arg to a few functions - [5]
LF7BWEG4group all editor globals
Change contents
- replacement in text_tests.lua at line 1973
Editor_state.lines = load_array{'abc', 'def', 'ghi', 'deg'}Editor_state.lines = load_array{'```lines', '```', 'def', 'ghi', 'deg'} - edit in text_tests.lua at line 1979
local y = Editor_state.topApp.screen.check(y, 'abc', 'F - test_search/baseline/screen:1')y = y + Editor_state.line_heightApp.screen.check(y, 'def', 'F - test_search/baseline/screen:2')y = y + Editor_state.line_heightApp.screen.check(y, 'ghi', 'F - test_search/baseline/screen:3') - edit in text_tests.lua at line 1987
Editor_state.screen_top1 = {line=1, pos=1} - edit in search.lua at line 25
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 thenState.cursor1.pos = poslocal line = State.lines[State.cursor1.line]if line.mode == 'text' thenpos = line.data:find(State.search_term, State.cursor1.pos)if pos thenState.cursor1.pos = posend - 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 thenState.cursor1.line = iState.cursor1.pos = posbreaklocal line = State.lines[i]if line.mode == 'text' thenpos = State.lines[i].data:find(State.search_term)if pos thenState.cursor1.line = iState.cursor1.pos = posbreakend