On Tue, Feb 28, 2006 at 05:30:49PM +0100, Lars Gullik Bjønnes wrote: > Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > | >>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > | > | Georg> What makes me > | Georg> also sure that this patch is correct is the fact that > | Georg> niceInsert() is used in 1.3 unconditionally, too. > | > | That is a convincing reason indeed: > > go for it then
Georg, OK if I commit this? It's your fix as much as mine - Martin
Index: ChangeLog =================================================================== --- ChangeLog (revision 13279) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-02-28 Martin Vermeer <[EMAIL PROTECTED]> + + * cursor.C (niceInsert): fix (properly) insertion of + fonts/decorations around selection + 2006-02-25 Georg Baum <[EMAIL PROTECTED]> * lyxfont.C (lyxWriteChanges): Don't write \lang latex Index: cursor.C =================================================================== --- cursor.C (revision 13276) +++ cursor.C (working copy) @@ -379,6 +379,8 @@ } +// Don't use this routine. It is erroneous: LFUN_PASTE should be called with +// buffer number, not data to be inserted -- MV 26.02.2006 void LCursor::paste(string const & data) { if (!data.empty()) @@ -712,7 +714,10 @@ // be careful here: don't use 'pushLeft(t)' as this we need to // push the clone, not the original pushLeft(*nextInset()); - paste(safe); + // We may not use niceInsert here (recursion) + MathArray ar; + asArray(safe, ar); + insert(ar); } } Index: mathed/ChangeLog =================================================================== --- mathed/ChangeLog (revision 13279) +++ mathed/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-02-28 Martin Vermeer <[EMAIL PROTECTED]> + + * math_nestinset.C (doDispatch): fix (properly) insertion of + fonts/decorations around selection + 2006-02-23 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * math_data.C (x2pos): Place cursor correctly in the case of Index: mathed/math_nestinset.C =================================================================== --- mathed/math_nestinset.C (revision 13276) +++ mathed/math_nestinset.C (working copy) @@ -888,13 +888,7 @@ int cell(0); if (cmd.argument == "\\root") cell = 1; - // math macros are nest insets and may have 0 cells. - // handleNest would crash in this case. - if (ar.size() == 1 && (ar[0].nucleus()->asNestInset()) && - ar[0].nucleus()->nargs() > MathInset::idx_type(cell)) { - cur.handleNest(ar[0], cell); - } else - cur.niceInsert(cmd.argument); + cur.niceInsert(cmd.argument); break; }
pgpJcrBiRgCc7.pgp
Description: PGP signature