3 ms·
Since there is only a passing mention of the gap-buffer datastructure in the post you linked to, I am leaving this here https://en.wikipedia.org/wiki/Gap_buffer
by srean 9y ago
Since there is only a passing mention of the gap-buffer datastructure in the post you linked to, I am leaving this here https://en.wikipedia.org/wiki/Gap_buffer https://en.wikipedia.org/wiki/Gap_buffer
Super easy to implement and gets you a long way. I am a little surprised that it has not come up yet on a thread on editor implementations.
In fact the author of the blog post talks about it in his very next post. Here's his lede
Last week, I promised to continue my discussion of ropes.
I’m going to break that promise. But it’s in a good cause.
http://scienceblogs.com/goodmath/2009/02/18/gap-buffers-or-why-bother-with-1/ http://scienceblogs.com/goodmath/2009/02/18/gap-buffers-or-w...