From 8484324f751a91018627979461ef8af236dc6f48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 13 Mar 2007 00:48:25 +0000 Subject: [PATCH] Fix #988. Note that this introduces a new translatable message git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17429 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathNest.C | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mathed/InsetMathNest.C b/src/mathed/InsetMathNest.C index 8488363616..b41577c6b3 100644 --- a/src/mathed/InsetMathNest.C +++ b/src/mathed/InsetMathNest.C @@ -1206,9 +1206,16 @@ void InsetMathNest::lfunMouseRelease(LCursor & cur, FuncRequest & cmd) } +// return false when we leave the formula bool InsetMathNest::interpretChar(LCursor & cur, char_type c) { //lyxerr << "interpret 2: '" << c << "'" << endl; + if (currentMode() == TEXT_MODE && (c == '^' || c == '_')) { + theLyXFunc().setMessage( + _("Superscripts and subscripts are not allowed in math text mode.")); + return true; + } + docstring save_selection; if (c == '^' || c == '_') save_selection = grabAndEraseSelection(cur); -- 2.39.5