Place autocorrect at the top of `InsetMathNest::interpretChar`,
ensuring that any autocorrections that trigger on special characters
(such as '^' or '~') work. In particular, you can now make an
autocorrection from "<~" to "\preceq"!
bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
{
+ // try auto-correction
+ if (lyxrc.autocorrection_math && cur.pos() != 0
+ && math_autocorrect(cur, c))
+ return true;
+
//lyxerr << "interpret 2: '" << c << "'" << endl;
docstring save_selection;
if (c == '^' || c == '_')
return true;
}
-
- // try auto-correction
- if (lyxrc.autocorrection_math && cur.pos() != 0
- && math_autocorrect(cur, c))
- return true;
-
// no special circumstances, so insert the character without any fuss
cur.insert(c);
return true;