If you refer to the one you attached in
http://forum.lazarus.freepascal.org/index.php/topic,26320.0On a very surface inspection: It stores a mapping of real line, and display line in fLineOffsets
(e.g if line 1 wraps, then line 2 becomes display line 3 ...)
That is how folding works (just reverse) The fold module does that. There is a concept of "views" wrapping around the text buffer, based on TSynEditStrings.
Only folding is not fully based on that yet, but it is meant to someday be.
So there is a place to hook. (unfinished...)
---
Problem:
fLineOffsets: array ...
works for small text.
But if you have 100,000 lines or more then it becomes *very CPU intensive.
Because if you jump to a bookmark at line 50000 you need to sum up all the lines above (required to set the scrollbar right)
So you need a better storage. Some kind of index. A tree with pages of line mappings.
--------------
And yes, all that "view" stuff, wass added after the fork. So the old edit does not have it.