From 3f3bedd0d9832ebd8c70ea0144387eadaaf5ab6f Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 15 Nov 2009 01:03:03 +0000 Subject: [PATCH] Fix another instance of missing buffer in math. This is needed when pasting a macro inside another math inset (such as \text or \hat). In this case the buffer would not be set and getMacro() cannot be called, such that an "internal" macro would still shadow an user defined one. This kind of fix is now easy after Abdel's overhaul. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31998 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Cursor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cursor.cpp b/src/Cursor.cpp index b652c035ef..2a6d4e6420 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1301,7 +1301,7 @@ void Cursor::insert(Inset * inset0) void Cursor::niceInsert(docstring const & t, Parse::flags f) { - MathData ar; + MathData ar(buffer()); asArray(t, ar, f); if (ar.size() == 1) niceInsert(ar[0]); @@ -1322,7 +1322,7 @@ void Cursor::niceInsert(MathAtom const & t) // push the clone, not the original pushBackward(*nextInset()); // We may not use niceInsert here (recursion) - MathData ar; + MathData ar(buffer()); asArray(safe, ar); insert(ar); } @@ -1473,7 +1473,7 @@ bool Cursor::macroModeClose() return false; InsetMathUnknown * p = activeMacro(); p->finalize(); - MathData selection; + MathData selection(buffer()); asArray(p->selection(), selection); docstring const s = p->name(); --pos(); -- 2.39.2