Fix handling of @ in math formulas

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1083 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-10-04 14:50:29 +00:00
parent 40b1da348c
commit 36fc101a20
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
2000-10-04 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/mathed/math_parser.C (LexInitCodes): set lexcode of "@" to
LexAlpha.
* src/mathed/formula.C (LocalDispatch): add '@' as an LM_TC_VAR
character.
* src/lyxlex.C (GetFloat): rewrite to use strToDbl() and
understand ',' instead of '.'.
(GetInteger): rewrite to use strToInt().

View File

@ -1165,7 +1165,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
result = FINISHED;
}
} else
if (c == '\'') {
if (c == '\'' || c == '@') {
mathcursor->Insert (c, LM_TC_VAR);
} else
if (c == '\\') {

View File

@ -128,7 +128,7 @@ void LexInitCodes()
lexcode['!'] = lexcode[','] = lexcode[':'] = lexcode[';'] = LexMathSpace;
lexcode['('] = lexcode[')'] = lexcode['|'] = lexcode['.'] = lexcode['?'] = LexOther;
lexcode['\'']= LexAlpha;
lexcode['\'']= lexcode['@'] = LexAlpha;
lexcode['['] = lexcode[']'] = lexcode['^'] = lexcode['_'] =
lexcode['&'] = LexSelf;