Angus Leeming wrote:

> I think that this is fantastic. Truly it is great to know someone who
> can turn the complex into the simple. You did it to the code in
> src/graphics and now you do it to the can of worms that is the LyX
> core. Bravo!

Angus, I certainly don't deserve this compliment, but I greatly appreciate
it. [C'mon, I had a minimal contribution in src/graphics. And for the LyX
core, I just humbly (sometimes even enthusiastically) follow the leader:
Andrà is putting most the work and ideas...]
 
> I can even follow the code. I think ;-)

It mostly borrowed it from ParIterator.  ;-)

> So now the difficult question: what is wrong with it? Why does it
> work only with static text? Presumably that is because any one of the
> four data members in PosIteratorItem can be invalidated by the
> insertion/deletion of text, of insets or indeed of paragraphs, right?

Exactly.

> So, how do you envisage keeping the data valid?

I don't know if that is desirable. Maybe we need some simple structs after
all. I don't know how the Cursor class will behave in this respect. As it
is based in paroffsets, it seems that it can lose track if for instance one
eliminates one paragraph before (and/or up in the hierarchy)... maybe it's
indeed something that needs discussion. The distributed cursor has the
advantage that it never gets invalidated except when we eliminate the
paragraph it's in.

Regards, Alfredo


Reply via email to