emacs-devel
[Top][All Lists]
Advanced

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

Re: Overlays as an AA-tree


From: Stefan Monnier
Subject: Re: Overlays as an AA-tree
Date: Mon, 06 Feb 2017 08:51:20 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> And here I thought it was rather an elegant solution :) (to the problem
> of one overlay's beg going past another's because of an insert).

It doesn't solve the problem of updating the tree after
a deletion (where some overlays may suddenly end up at the same place,
so the tree will also need some amount of reorganization).

> What's a better way? When adjusting for an insert at an overlay with
> front-advance non nil, first delete it from the tree, then
> reinsert it?

The way I look at it, there's no good reason to try and be very clever:
whenever the text is modified somewhere, remove all the overlays whose
end points fall within (or on the edge of) the change, and then
re-insert them.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]