Angus Leeming wrote:

> Alfredo Braunstein wrote:
>> You mean BDCEAF ?
> 
> Yes.
> 
>> Yes, that would be a way to solve the problem. It shouldn't be too
>> hard methinks. I'll think about it tonight.
> 
> Just comfort me. This isn't 'inset locking' is it?
> 
> Shudders.
> 

I don't think so... this is a global operation (just ensure that the cursor
is not in the way when closing insets).

In any case, one way that would work and not depend on the order of the
iteration is what I have proposed before:

something like cur.resize(cur.find(inset)) would do the trick.

where cur.find(inset) returns the position of the inset in the cursor stack
(or cur.size() if not found).
 
Alternatively, the different iteration ordering for inset_iterator you
proposed could be achieved by using prevInset instead of nextInset (and
some other minor adjustments). But I don't have a lyx tree right now...

Alfredo


Reply via email to