[Github-comments] [geany/geany] Track changes to navqueue positions as a document is edited (#1480)

Vasiliy Faronov notifications at xxxxx
Tue Apr 25 14:57:41 UTC 2017


@elextr I’m [trying out](https://github.com/vfaronov/geany/commit/ff1f28d8295e785abea27033d48c1e40d064373f) an approach based on Scintilla indicators. Instead of storing the actual position in the navqueue, I store a unique ID, and then fill that position with a special, hidden indicator with [its value set](http://www.scintilla.org/ScintillaDoc.html#SCI_SETINDICATORVALUE) to the same ID. To go to another queue item, I iterate over all ranges of this indicator in the document, until I get the range with the necessary ID.

So, in cases like replace-all, Scintilla does all the work for me.

I don’t even think this is too much of a hack. That indicator could reasonably be shown with [`INDIC_POINT`](http://www.scintilla.org/ScintillaDoc.html#SCI_INDICSETSTYLE) style, it would look like a trail of breadcrumbs.

I will probably need to limit the navqueue to some reasonable maximum length, so I don’t accumulate too many ranges that must be walked every time.

Also, I lose navqueue items whenever the document is reloaded.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1480#issuecomment-297057587
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170425/06c44aad/attachment.html>


More information about the Github-comments mailing list