Author: tommaso
Date: Sun Jun 12 03:19:07 2011
New Revision: 39017
URL: http://www.lyx.org/trac/changeset/39017

Log:
Disabled possibility to type macros in regexp-mode. Now typing \ inserts a \ 
(no need to type twice) while in regexp mode.
Addressing issue 4. at: 
http://permalink.gmane.org/gmane.editors.lyx.devel/136992

Modified:
   lyx-devel/trunk/src/mathed/InsetMathNest.cpp

Modified: lyx-devel/trunk/src/mathed/InsetMathNest.cpp
==============================================================================
--- lyx-devel/trunk/src/mathed/InsetMathNest.cpp        Sun Jun 12 02:12:26 
2011        (r39016)
+++ lyx-devel/trunk/src/mathed/InsetMathNest.cpp        Sun Jun 12 03:19:07 
2011        (r39017)
@@ -1668,7 +1668,10 @@
                bool reduced = cap::reduceSelectionToOneCell(cur);
                if (reduced || !cur.selection()) {
                        docstring const safe = cap::grabAndEraseSelection(cur);
-                       cur.insert(MathAtom(new 
InsetMathUnknown(from_ascii("\\"), safe, false)));
+                       if (!cur.inRegexped())
+                               cur.insert(MathAtom(new 
InsetMathUnknown(from_ascii("\\"), safe, false)));
+                       else
+                               cur.niceInsert(createInsetMath("backslash", 
buf));
                }
                return true;
        }

Reply via email to