On Sat, Apr 09, 2005 at 05:33:18PM +0300, Martin Vermeer wrote: > Here is the next patch... adding a cur.undispatched() statement did > the job. So the LFUN_FINISHED mechanism seems to work... in this > case, it allowed he cursor to skip out of the inset, immediately to > the right of the parentesis, when pressing the END key. But how now do > I get it to go forward to the next parentesis, i.e., execute LFUN_END > for the parent inset? (Yes, I know, pressing the END key again. Not > what I wanted to hear :)
Maybe we should really have a 'request queue' in the cursor. This would certainly simplify the logic in this area: When dispatching an LFUN_END at pos == lastpos, idx == lastidx, we'd simply pop off a cursor slice and re-add an LFUN_END request to that queue. LCursor::Dispatch would loop as long as there are events in that quue and ths pick up this re-added event in the next iteration and effectively dispatch it to the original inset's parent. No LFUN_FINISHED needed, no magical cursor.undispatch calls and even more flexible for the future as an inset may add more than one new event to the queue if needed etc... Andre'