emacs-devel
[Top][All Lists]
Advanced

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

Re: Overlay tree. Stuck again


From: Eli Zaretskii
Subject: Re: Overlay tree. Stuck again
Date: Fri, 13 Jan 2017 10:12:58 +0200

> From: Joakim Jalap <address@hidden>
> Date: Thu, 12 Jan 2017 22:10:44 +0100
> 
> However the nodes can be updated "externally" from the trees point of
> view. For example if there is a delete in the buffer those overlays
> which were in the deleted portion of the buffer will now be crowded at
> the from_char of the delete. But those could have any address, so they
> will probably be out of order. The problem is how to get them in order
> again.
> 
> As far as I've gotten is to gather all the affected nodes (which I think
> are only those of length zero which start (and end) at from_char) into
> an array and sort that. But I can't figure out how to get them into the
> tree again while keeping all the pointers correct.

This might be a silly idea, but did you try removing them from the
tree, and then re-adding them?  (I assume that adding a node will
produce an ordered tree.)

Apologies if I'm missing something obvious.



reply via email to

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