I also wrote this version:
```lua
-- SCI_GETLENGTH
local iL = geany.scintilla(2006, 0, 0)
local n1, n2
n1 = 0
while true do
-- SCI_INDICATORVALUEAT
if geany.scintilla(2507, 8, n1) > 0 then
-- SCI_LINEFROMPOSITION
n2 = geany.scintilla(2166, n1, 0)
-- SCI_MARKERADD
geany.scintilla(2043, n2, 1)
-- SCI_GETLINEENDPOSITION
n1 = geany.scintilla(2136, n2, 0)
end
n1 = n1 + 1
if n1 > iL then break end
end
```
and this version started working.
@kupernikus87
Thanks! I made this version
```lua
-- SCI_GETLENGTH
local iL = geany.scintilla(2006, 0, 0)
local n1, n2, n3
n1 = 0
while true do
-- SCI_INDICATORVALUEAT
if geany.scintilla(2507, 8, n1) > 0 then
-- SCI_LINEFROMPOSITION
n3 = geany.scintilla(2166, n1, 0)
-- SCI_MARKERADD
geany.scintilla(2043, n3, 1)
-- SCI_INDICATOREND
n2 = geany.scintilla(2509, 8, n1)
else
-- SCI_INDICATOREND
n2 = geany.scintilla(2509, 8, n1)
end
if n2 <= n1 then break end
n1 = n2
if n1 > iL then break end
end
```
I tested both with a large number of bookmarks (~1600-1700) with a plain text
file (i.e. without syntax highlighting) and the second script works
significantly faster (in this case, approximately five times faster).
It is still unclear why `SCI_MARKERNEXT` does not work with
`GEANY_INDICATOR_SEARCH`?
(`GEANY_INDICATOR_SEARCH` = 8 = `INDIC_CONTAINER`.)
P.S.
> Note: Geany uses Scintilla marker 0 for its standard native bookmarks
For commands like "Mark" and "Go to * marker" Geany uses marker 1.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/4602#discussioncomment-17449872
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/repo-discussions/4602/comments/[email protected]>