← Back to context

Comment by filcuk

3 days ago

That would depend on your editor's implementation.

But, within this API, is there any support for the associations with non-character data?

For example, if you delete some text these Ropey data structure, does Ropey have facilities to update the associated non-character data (such as deleting all or part of one or more chunks of the non-character data, and/or updating positional information)? Or do you have to do that separately outside of Ropey?

  • A rope is only concerned with manipulating a string with very low cpu overhead while maintaining the illusion of a sequence of characters or bytes. It doesn't really care or maintain any other text decoration you might be maintaining. That is the concern of the consumer of the rope and I'm not sure there is a good common interface for that.

    • Thanks.

      I was a little confused, because the lede sentence was "Ropey is a utf8 text rope for Rust, designed to be the backing text-buffer for applications such as text editors."

      Pretty much all text editors are expected to implement decorations and references, somehow, and some popular text buffer APIs support those.

      5 replies →