#include "frontends/Painter.h"
#include "frontends/Selection.h"
+#include "support/lassert.h"
#include "support/debug.h"
#include "support/gettext.h"
#include "support/lstrings.h"
// to touch all (math)inset's draw() methods. Right now, we'll store
// absolute value, and make them here relative, only to make them
// absolute again when actually drawing the cursor. What a mess.
- BOOST_ASSERT(&sl.inset() == this);
+ LASSERT(&sl.inset() == this, /**/);
MathData const & ar = sl.cell();
CoordCache const & coord_cache = bv.coordCache();
if (!coord_cache.getArrays().has(&ar)) {
bool InsetMathNest::idxNext(Cursor & cur) const
{
- BOOST_ASSERT(&cur.inset() == this);
+ LASSERT(&cur.inset() == this, /**/);
if (cur.idx() == cur.lastidx())
return false;
++cur.idx();
bool InsetMathNest::idxPrev(Cursor & cur) const
{
- BOOST_ASSERT(&cur.inset() == this);
+ LASSERT(&cur.inset() == this, /**/);
if (cur.idx() == 0)
return false;
--cur.idx();
bool InsetMathNest::idxFirst(Cursor & cur) const
{
- BOOST_ASSERT(&cur.inset() == this);
+ LASSERT(&cur.inset() == this, /**/);
if (nargs() == 0)
return false;
cur.idx() = 0;
bool InsetMathNest::idxLast(Cursor & cur) const
{
- BOOST_ASSERT(&cur.inset() == this);
+ LASSERT(&cur.inset() == this, /**/);
if (nargs() == 0)
return false;
cur.idx() = cur.lastidx();
else {
MathData ar;
asArray(cmd.argument(), ar);
- if (ar.size() == 1 && ar[0]->asNestInset())
+ if (ar.size() == 1 && ar[0]->asNestInset()
+ && ar[0]->asNestInset()->nargs() > 1)
handleNest(cur, ar[0]);
else
cur.niceInsert(cmd.argument());
cur.backspace();
cur.niceInsert(MathAtom(new InsetMathComment));
} else if (c == '#') {
- BOOST_ASSERT(cur.activeMacro());
+ LASSERT(cur.activeMacro(), /**/);
cur.activeMacro()->setName(name + docstring(1, c));
} else {
cur.backspace();
cur.inset().idxFirst(cur);
return true;
}
- if (cur.posForward() || idxForward(cur) || cur.selection())
+ if (cur.posForward() || idxForward(cur))
return true;
// try to pop forwards --- but don't pop out of math! leave that to
// the FINISH lfuns
cur.inset().idxLast(cur);
return true;
}
- if (cur.posBackward() || idxBackward(cur) || cur.selection())
+ if (cur.posBackward() || idxBackward(cur))
return true;
// try to pop backwards --- but don't pop out of math! leave that to
// the FINISH lfuns
globals.push_back(from_ascii("\\stackrel"));
globals.push_back(from_ascii("\\binom"));
globals.push_back(from_ascii("\\choose"));
- globals.push_back(from_ascii("\\choose"));
+ globals.push_back(from_ascii("\\brace"));
+ globals.push_back(from_ascii("\\brack"));
globals.push_back(from_ascii("\\frac"));
globals.push_back(from_ascii("\\over"));
globals.push_back(from_ascii("\\nicefrac"));