cur.selHandle(cmd.action == LFUN_RIGHTSEL);
cur.autocorrect() = false;
cur.clearTargetX();
- if (cur.inMacroMode())
- cur.macroModeClose();
- else if (cur.pos() != cur.lastpos() && cur.openable(cur.nextAtom())) {
+ cur.macroModeClose();
+ if (cur.pos() != cur.lastpos() && cur.openable(cur.nextAtom())) {
cur.pushLeft(*cur.nextAtom().nucleus());
cur.inset().idxFirst(cur);
} else if (cur.posRight() || idxRight(cur)
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);
cur.niceInsert(MathAtom(new MathBraceInset));
} else if (c == '%') {
cur.backspace();
- cur.niceInsert(MathAtom(new MathSymbolInset("%")));
+ cur.niceInsert(MathAtom(new MathCommentInset));
} else if (c == '#') {
lyxerr << "setting name to " << name + c << endl;
BOOST_ASSERT(cur.activeMacro());
return true;
}
- //if (c == '%') {
- // cur.niceInsert(MathAtom(new MathCommentInset));
- // return true;
- //}
+ if (c == '~') {
+ cur.niceInsert(createMathInset("sim"));
+ return true;
+ }
// try auto-correction
//if (autocorrect() && hasPrevAtom() && math_autocorrect(prevAtom(), c))
bool MathNestInset::script(LCursor & cur, bool up)
{
- // Hack to get \\^ and \\_ working
+ // Hack to get \^ and \_ working
lyxerr << "handling script: up: " << up << endl;
if (cur.inMacroMode() && cur.macroName() == "\\") {
if (up)