On Thu, Nov 03, 2005 at 09:06:17AM +0100, Helge Hafting wrote: > The bugzilla entry is now updated with a test document and this crash > recipe. It trips the assert everytime for me:
Here's the fix. - Martin
Index: text2.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.634 diff -u -p -r1.634 text2.C --- text2.C 25 Oct 2005 09:14:11 -0000 1.634 +++ text2.C 3 Nov 2005 12:02:28 -0000 @@ -461,6 +461,10 @@ void LyXText::setFont(LCursor & cur, LyX DocIterator dit = cur.selectionBegin(); DocIterator ditend = cur.selectionEnd(); + // if dit deeper than ditend, make them the same: + if (dit.depth() > ditend.depth()) + dit.resize(ditend.depth()); + BufferParams const & params = cur.buffer().params(); // Don't use forwardChar here as ditend might have
pgpNpAOKfdMY9.pgp
Description: PGP signature