On Mon, Nov 03, 2003 at 09:44:35PM +0100, Alfredo Braunstein wrote:
> Kornel Benko wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > 
> > cvs from today.
> > I have tried to make a minimal lyx-example for the undo crash.
> > 1.) Select some text inside the enumarated part
> > 2.) type any text
> > 3.) undo it
> > 4.) undo once again -> command not! disabled, -> crash
> 
> This is the problem. The cache_par_ cache_pos bussiness is buggy: if you
> delete the par it's pointing to, then s*** happends. It's particularly
> incompatible with undo...
> 
> Ok to remove it?

Hm... comment it out and put a warning there. I'll have a look again
later.

Something like that will be needed or we'd need to be a bit more careful
not to call  cursorPar() too often. It is comparatively expensive and
shows up prominently in the profile

Another possibility to explore would be using std::vector<Paragraph> or
deque as ParagraphList. Removing/inserting paragraphs in the middle
does not happen too often and almost always as reaction to user
interaction, so it does not have to be terribly fast...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to