Skif-off left a comment (geany/geany-plugins#1579)
2.) Maybe something like
```lua
-- Find-and-mark-by-list.lua (cross-platform)
-- 2026.08.04
--[[
Find & mark by list. See the "aF" table (the second parameter is the
parameters of the "geany.find" function, see
https://plugins.geany.org/geanylua/geanylua-ref.html).
Idea: https://github.com/geany/geany-plugins/issues/1579
]]
local aF = {
{"find1", {"matchcase"}},
{"find2", {}},
{"find3", {"matchcase", "wholeword"}}
}
local sT = geany.selection()
if sT == nil then
geany.message("There is no open document!")
return
end
-- Clear previous search indicators
-- SCI_GETLENGTH
local iL = geany.scintilla(2006, 0, 0)
if iL == 0 then
geany.message("Is the document empty?")
return
else
-- SCI_SETINDICATORCURRENT ÷ GEANY_INDICATOR_SEARCH
geany.scintilla(2500, 8, 0)
-- SCI_INDICATORCLEARRANGE
geany.scintilla(2505, 0, iL)
end
-- Find and mark
local n1, n2
for i = 1, #aF do
n1, n2 = 0, 0
while true do
n1, n2 = geany.find(aF[i], n1, iL, aF[i])
if n1 == nil then break end
-- SCI_SETINDICATORCURRENT ÷ GEANY_INDICATOR_SEARCH
geany.scintilla(2500, 8, 0)
-- SCI_INDICATORFILLRANGE
geany.scintilla(2504, n1, n2 - n1)
n1 = n2
end
end
geany.status(geany.basename(geany.script) .. ": Done.")
```
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1579#issuecomment-5178363820
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/issues/1579/[email protected]>