This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have a text editor with addressing by (line, column) pairs. In this editor, intervals (line, column) - (line, column) represent regions. These intervals are stored in an interval tree for efficient lookup.
Insertions and deletions may span multiple lines. Word-wrapping is handled separately. When text is inserted or deleted, all intervals overlapping with or following the inserted or deleted text need to be adjusted. Some cases are easy and I already handle most of them correctly, but some cases are more complex and I fear I've missed some edge cases. Is there a systematic theory for these kinds of interval adjustments? If not, are there known implementations and other resources I could use for checking my implementation?
Subreddit
Post Details
- Posted
- 7 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/AskProgramm...