On Sun, Apr 09, 2006 at 10:16:24AM +0200, Georg Baum wrote:
> Am Samstag, 8. April 2006 21:28 schrieb Martin Vermeer:
> > Undo is a snake nest... one of the snakes being the pair of methods
> > 
> >     std::string asString(MathArray const & ar);
> >     void asArray(std::string const & str, MathArray & ar);
> > 
> > found in math_support. These convert a math array to a string and back,
> > ideally in a non-lossy and invertible way. In reality not, I suspect.
> > And that is where those broken cursors come from...
> 
> I think I know why this happens: Because of the 'clever' handling of \\ 
> after the last line in the math parser. Unfortunately I don't know how to 
> solve this problem.

Actually I think this was a false alarm. The real problem was calling
recordUndo when recordUndoInset was appropriate, in NestInset.
 
> > Is there a way to store a true MathArray into the Undo object? Then
> > these conversions are not needed. Was it considered too expensive?
> 
> Even if we would do that the invariant asArray(asString(ar)) == ar would 
> still be needed for the document save/load cycle.

Agreed. And I realized that after sending off my mail. In reality we would
have painfully noticed any lack of invariance here.

- Martin

Attachment: pgpiBGCbXx5gs.pgp
Description: PGP signature

Reply via email to