lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

In message <> you wrote:

> I think that approach is basically known as a gap buffer.

> Text markers can be stored as a mapping from marker ID to offset.

A good feature of representing a gap buffer by a pair of lists (
before-cursor, after-cursor) is that if the after-list is indexed
from the end of the text, markers are invariant under cursor movement,
until they get spilled from one list to the other. That particular
update can then be done lazily, until an action that uses the marker
is initiated.

Gavin Wraith (
Home page: