]> git.lyx.org Git - features.git/commitdiff
make Pavel happy
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 23 Dec 2008 17:25:11 +0000 (17:25 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 23 Dec 2008 17:25:11 +0000 (17:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27971 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXAction.cpp
src/mathed/InsetMathNest.cpp

index 98c44f582237933d0b6eedc1505f496e3443ab63..3c7082c3414d6e279545a31684722df492220141 100644 (file)
@@ -1485,10 +1485,14 @@ void LyXAction::init()
  * \var lyx::FuncCode lyx::LFUN_MATH_SPACE
  * \li Action: Inserts space into math expression.
  * \li Notion: Use spacebar after entering this space to change type of space.
- * \li Syntax: math-space [<TYPE>]
- * \li Params: <TYPE>: negative spaces: !|negmedspace|negthickspace \n
-                       positive spaces: ,|:|;|quad|qquad \n
+ * \li Syntax: math-space [<TYPE>] [<LEN>]
+ * \li Params: <TYPE>: negative spaces: !|negthinspace|negmedspace|negthickspace \n
+                       positive spaces: ,|thinspace|:|medspace|;|thickspace|enskip|quad|qquad \n
+                       custom space: hspace \n
                        "," used by default.
+                       Note that ! is equivalent to negthinspace, , = thinspace,
+                       : = medspace, and ; = thickspace.
+               <LEN>: length for custom spaces (hspace)
  * \li Origin: Andre, 25 Jul 2001; sanda, 16 Jun 2008
  * \endvar
  */
index 11531f661408ca54141cd0fe496536cf1a95dfd9..837b6234e1364d191fe4170469639a02786b64d1 100644 (file)
@@ -1061,8 +1061,11 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                cur.recordUndoSelection();
                if (cmd.argument().empty())
                        cur.insert(MathAtom(new InsetMathSpace));
-               else
-                       cur.insert(MathAtom(new InsetMathSpace(to_utf8(cmd.argument()), "")));
+               else {
+                       string const name = cmd.getArg(0);
+                       string const len = cmd.getArg(1);
+                       cur.insert(MathAtom(new InsetMathSpace(name, len)));
+               }
                break;
 
        case LFUN_ERT_INSERT: