]> git.lyx.org Git - features.git/commitdiff
fix #1589
authorAndré Pönitz <poenitz@gmx.net>
Fri, 13 Aug 2004 09:31:48 +0000 (09:31 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 13 Aug 2004 09:31:48 +0000 (09:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8892 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/cursor.C
src/mathed/ChangeLog
src/mathed/math_factory.C
src/mathed/math_nestinset.C
src/metricsinfo.C

index 9a0e9d5945d479854f6e2a7efe2ea854fb9ac8df..c496dc6f7b83d286f4109cd6cb000ef8161664e4 100644 (file)
@@ -1,4 +1,8 @@
 
+2004-08-13  André Pönitz  <poenitz@gmx.net>
+
+       * cursor.C: macroModeClose: use plainInsert instead of niceInsert.
+   
 2004-08-12  André Pönitz  <poenitz@gmx.net>
 
        * text3.C: take out the 'cursor right' form insertInset and only
index 82a0a58b31841afa25799a8b65fc474f6afe48bc..b29605efe336dc0fd99d1e7bc0acb8980c047183 100644 (file)
@@ -711,13 +711,17 @@ void LCursor::macroModeClose()
                return;
 
        string const name = s.substr(1);
+       lyxerr << "creating macro of name '" << name << "'" << endl;
 
        // prevent entering of recursive macros
+       // FIXME: this is only a weak attempt... only prevents immediate
+       // recursion
        InsetBase const * macro = innerInsetOfType(InsetBase::MATHMACRO_CODE);
        if (macro && macro->getInsetName() == name)
                lyxerr << "can't enter recursive macro" << endl;
 
-       niceInsert(createMathInset(name));
+       //niceInsert(createMathInset(name));
+       plainInsert(createMathInset(name));
 }
 
 
index 79c21370bfd81e5ed3724319ca717b484d824352..f616f763825dd8f34f7fff5c5ae78ceb6d79fc1e 100644 (file)
@@ -1,4 +1,5 @@
 
+
 2004-08-12  André Pönitz  <poenitz@gmx.net>
 
        * math_nestinset.C: Fix #1249
@@ -8,9 +9,9 @@
 2004-07-24  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * math_support.C, math_parser.C, math_nestinset.C, math_macrotable.C:
-       * math_hullinset.C, math_gridinset.C, math_factory.C:
-       * math_extern.C, math_autocorrect.C, math_arrayinset.C:
-       * formulamacro.C, command_inset.C: change "support/std_sstream.h"
+       * math_hullinset.C, math_gridinset.C, math_factory.C: math_extern.C,
+       * math_autocorrect.C, math_arrayinset.C: formulamacro.C,
+       * command_inset.C: change "support/std_sstream.h"
        to <sstream>
 
 2004-07-24  Lars Gullik Bjonnes  <larsbj@gullik.net>
index 1b54db1285f179db1f58bf481d4705544484884a..7ec8c19dec015d315b10cb9b73613ca92b0b60de 100644 (file)
@@ -327,6 +327,7 @@ MathAtom createMathInset(string const & s)
        //      return MathAtom(new MathMacro(s,
        //              MacroTable::localMacros().get(s).numargs()));
 
+       lyxerr << "creating unknown inset '" << s << "'" << endl;
        return MathAtom(new MathUnknownInset(s));
 }
 
index 183ecf7e9aa3772cd57eb715eb9193a1a642a59b..724e8420fb71515f4b43746359d4253751dd09df 100644 (file)
@@ -442,8 +442,7 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
                cur.selHandle(cmd.action == LFUN_RIGHTSEL);
                cur.autocorrect() = false;
                cur.clearTargetX();
-               if (cur.inMacroMode())
-                       cur.macroModeClose();
+               cur.macroModeClose();
                else if (cur.pos() != cur.lastpos() && cur.openable(cur.nextAtom())) {
                        cur.pushLeft(*cur.nextAtom().nucleus());
                        cur.inset().idxFirst(cur);
@@ -459,9 +458,8 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
                cur.selHandle(cmd.action == LFUN_LEFTSEL);
                cur.autocorrect() = false;
                cur.clearTargetX();
-               if (cur.inMacroMode())
-                       cur.macroModeClose();
-               else if (cur.pos() != 0 && cur.openable(cur.prevAtom())) {
+               cur.macroModeClose();
+               if (cur.pos() != 0 && cur.openable(cur.prevAtom())) {
                        cur.posLeft();
                        cur.push(*cur.nextAtom().nucleus());
                        cur.inset().idxLast(cur);
index 60ba208a4faec2581d6abac2e82207c4163fe9e8..b49eac04c8f67290df571e854f501bb7e7c5b401 100644 (file)
@@ -121,7 +121,8 @@ ShapeChanger::~ShapeChanger()
 StyleChanger::StyleChanger(MetricsBase & mb, Styles style)
        :       Changer<MetricsBase>(mb)
 {
-       static const int diff[4][4]  = { { 0, 0, -3, -5 },
+       static const int diff[4][4] =
+         { { 0, 0, -3, -5 },
                                         { 0, 0, -3, -5 },
                                         { 3, 3,  0, -2 },
                                         { 5, 5,  2,  0 } };