mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Remove unneeded check for cur.pos() > 0.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30393 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fb57c00c0d
commit
abdb069f9e
@ -1569,17 +1569,15 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (cur.pos() > 0) {
|
||||
MathMacro const * macro = cur.inset().asInsetMath()->asMacro();
|
||||
if (macro && macro->displayMode() == MathMacro::DISPLAY_UNFOLDED) {
|
||||
// resume macro_mode
|
||||
docstring const & s = macro->name();
|
||||
cur.leaveInset(*macro);
|
||||
cur.plainErase();
|
||||
docstring safe = grabAndEraseSelection(cur);
|
||||
cur.insert(MathAtom(new InsetMathUnknown("\\" + s + c, safe, false)));
|
||||
return true;
|
||||
}
|
||||
MathMacro const * macro = cur.inset().asInsetMath()->asMacro();
|
||||
if (macro && macro->displayMode() == MathMacro::DISPLAY_UNFOLDED) {
|
||||
// resume macro_mode
|
||||
docstring const & s = macro->name();
|
||||
cur.leaveInset(*macro);
|
||||
cur.plainErase();
|
||||
docstring safe = grabAndEraseSelection(cur);
|
||||
cur.insert(MathAtom(new InsetMathUnknown("\\" + s + c, safe, false)));
|
||||
return true;
|
||||
}
|
||||
|
||||
selClearOrDel(cur);
|
||||
|
Loading…
Reference in New Issue
Block a user