For scaling large docs, you can do a linked list of gap buffers and avoid re-allocs of large buffers.
Super simple, efficient enough for most “i wrote my own text editor”, can always plug in a more complex structure later.
Author’s implementation will drag down if you have very long lines (e.g., transpiled JS).
For scaling large docs, you can do a linked list of gap buffers and avoid re-allocs of large buffers.
Super simple, efficient enough for most “i wrote my own text editor”, can always plug in a more complex structure later.
Author’s implementation will drag down if you have very long lines (e.g., transpiled JS).