#include <fstream>
#include "Lsstream.h"
+#include "support/LAssert.h"
#ifdef __GNUG__
#pragma implementation
result = UNDISPATCHED;
}
+ lyx::Assert(mathcursor);
//mathcursor->normalize();
- if (was_macro != mathcursor->inMacroMode()
- && action >= 0 && action != LFUN_BACKSPACE)
+ if (//was_macro != mathcursor->inMacroMode() &&
+ action >= 0 && action != LFUN_BACKSPACE)
updateLocal(bv, true);
if (mathcursor->selection() || was_selection)
void MathCursor::push(MathAtom & t)
{
- //cerr << "Entering atom "; t->write(cerr, false); cerr << " left\n";
MathCursorPos p;
p.par_ = &t;
+ p.idx_ = 0;
+ p.pos_ = 0;
Cursor_.push_back(p);
}
if (pos() > size()) {
lyxerr << "this should not really happen - 2: "
- << pos() << " " << size() << "\n";
+ << pos() << " " << size() << " in idx: " << it->idx()
+ << " in atom: '";
+ it->par()->write(lyxerr, false);
+ lyxerr << "\n";
dump("error 4");
}
it->pos() = min(pos(), size());
if (hasPrevAtom() && prevAtom()->asScriptInset()) {
prevAtom()->asScriptInset()->ensure(up);
pushRight(prevAtom());
+ idx() = up;
pos() = size();
} else if (hasNextAtom() && nextAtom()->asScriptInset()) {
nextAtom()->asScriptInset()->ensure(up);
pushLeft(nextAtom());
+ idx() = up;
pos() = 0;
} else {
plainInsert(MathAtom(new MathScriptInset(up)));
+ prevAtom()->asScriptInset()->ensure(up);
pushRight(prevAtom());
+ idx() = up;
+ pos() = 0;
}
- idx() = up;
selPaste();
+ dump("1");
return;
}
else
insert(c, LM_TC_VAR);
-#warning greek insert problem? look here!
if (lastcode_ == LM_TC_GREEK1)
lastcode_ = LM_TC_VAR;
return;
{
return script_[0];
}
+
+
+bool MathScriptInset::idxRight(MathInset::idx_type &,
+ MathInset::pos_type &) const
+{
+ return false;
+}
+
+
+bool MathScriptInset::idxLeft(MathInset::idx_type &,
+ MathInset::pos_type &) const
+{
+ return false;
+}
+
+
///
int width(MathInset const * nucleus) const;
+ ///
+ bool idxLeft(MathInset::idx_type &, MathInset::pos_type &) const;
+ ///
+ bool idxRight(MathInset::idx_type &, MathInset::pos_type &) const;
+
///
MathScriptInset const * asScriptInset() const;
///