Apart from your intuition do you see any other reason to recompute the 
links after each delete? What could possible be changed? Child index? If 
the deletions are done in the order from largest to smallest one, none of 
them will change. The other part is vnode instance which can't be changed 
either. So, what is the reason you think link recalculation is necessary?

The solution I suggested doesn't operate on positions, but directly on 
vnodes. It is short and clean and I am rather sure it is correct. By all 
means we should create some tests for it, but I would not hesitate too much 
to put it in both devel and 6.2. In rather unlikely case that someone 
reports a bug regarding this it would be trivial to revert the code in its 
current state. 

There is already a unit test in unitTest.leo for this method and my code is 
passing this test. I have created a test that shows the original code is 
not working and my code is passing this test too. I am not sure what else 
to test. The only thing that comes to my mind is to use hypothesis to 
generate thousands of random trees and try this method on.

Vitalije


-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0565b0bd-b7e9-40a3-9884-ab5e666cb95a%40googlegroups.com.

Reply via email to