On Tue, Mar 30, 2004 at 01:00:50PM +0200, Alfredo Braunstein wrote: > Alfredo Braunstein wrote: > > > We could add a bool DocumentIterator::contains(inset *) that checks the > > stack for that particular inset. then > > > > + if (cur.contains(&*it)) > > + cur.pop(); > > ... and cur.pop is no good either. we need to cut it to the level in which > the inset is found. > > What do you think?
So why is handling of this lfun not postponed until the right level came up? As far as I can tell there are two cases: 1. LFUN_TOGGLE is applied to the 'thing to the right'. Should be handled in LyXText::dipatch. 2. LFUN_TOGGLE is applied to an inset the cursor is in. The inset's dispatch + FINISHED mutation should be ok. Andre'