]> git.lyx.org Git - features.git/commitdiff
swap \{ and { during input
authorAndré Pönitz <poenitz@gmx.net>
Fri, 13 Sep 2002 06:40:19 +0000 (06:40 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 13 Sep 2002 06:40:19 +0000 (06:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5298 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C

index 692c63b773e6dad48588cb5d80335e3861d4d831..1ce05618b652271e9c452077e9addd2e9d490d36 100644 (file)
@@ -1222,8 +1222,11 @@ bool MathCursor::interpret(char c)
                                        niceInsert(createMathInset("textbackslash"));
                                else
                                        niceInsert(createMathInset("backslash"));
-                       } else
+                       } else if (c == '{') {
+                               niceInsert(MathAtom(new MathBraceInset));
+                       } else {
                                niceInsert(createMathInset(string(1, c)));
+                       }
                        return true;
                }
 
@@ -1286,23 +1289,12 @@ bool MathCursor::interpret(char c)
        }
 
        if (c == '#') {
-               insert(c); // LM_TC_TEX;
-               return true;
-       }
-
-/*
-       if (c == '{' || c == '}', c)) {
-               insert(c); // LM_TC_TEX;
-               return true;
-       }
-*/
-
-       if (c == '{') {
-               niceInsert(MathAtom(new MathBraceInset));
+               insert(c);
                return true;
        }
 
-       if (c == '}') {
+       if (c == '{' || c == '}') {
+               niceInsert(createMathInset(string(1, c)));
                return true;
        }