search: transparently handle drawings everywhere
[?]
Aug 12, 2022, 5:17 AM
7PZ4CQFVYUMSJKVCNM75VKK5JCUYU6ICHWPZXXIC3S63YJVFCP5QCDependencies
- [2]
MSOQI3A5bugfix: check before cursor on same line - [3]
EETIR4GXbugfix: skip over drawings when searching - [4]
LXTTOB33extract a couple of files - [5]
LF7BWEG4group all editor globals - [6]
5ZA3BRNYadd state arg to a few functions
Change contents
- edit in search.lua at line 23
local pos - replacement in search.lua at line 24
local 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 = posendlocal pos = find(State.lines[State.cursor1.line].data, State.search_term, State.cursor1.pos)if pos thenState.cursor1.pos = pos - replacement in search.lua at line 31
local 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 = posbreakendpos = find(State.lines[i].data, State.search_term)if pos thenState.cursor1.line = iState.cursor1.pos = posbreak - replacement in search.lua at line 42
pos = State.lines[i].data:find(State.search_term)pos = find(State.lines[i].data, State.search_term) - replacement in search.lua at line 52
local line = State.lines[State.cursor1.line]if line.mode == 'text' thenpos = line.data:find(State.search_term)if pos and pos < State.cursor1.pos thenState.cursor1.pos = posendpos = find(State.lines[State.cursor1.line].data, State.search_term)if pos and pos < State.cursor1.pos thenState.cursor1.pos = pos - edit in search.lua at line 108
endfunction find(s, pat, i)if s == nil then return endreturn s:find(pat, i) - edit in search.lua at line 116
if s == nil then return end