]> git.lyx.org Git - features.git/commitdiff
Fix bug #7014. The problem here is that we get DEFSKIP if we don't
authorRichard Heck <rgheck@comcast.net>
Wed, 3 Nov 2010 20:12:18 +0000 (20:12 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 3 Nov 2010 20:12:18 +0000 (20:12 +0000)
recognize the argument, but that leads to an infinite loop.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36012 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp

index 5455847e963f08887e0e168a2e64b9452e026d11..d483cbbd749af65d12504409b690abf1c3ac9c61 100644 (file)
@@ -645,11 +645,11 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                pimpl_->indentation = HSpace(indentation);
        } else if (token == "\\defskip") {
                lex.next();
-               string defskip = lex.getString();
-               if (defskip == "defskip")
-                       // this is invalid
-                       defskip = "medskip";
+               string const defskip = lex.getString();
                pimpl_->defskip = VSpace(defskip);
+               if (pimpl_->defskip.kind() == VSpace::DEFSKIP)
+                       // that is invalid
+                       pimpl_->defskip = VSpace(VSpace::MEDSKIP);
        } else if (token == "\\quotes_language") {
                string quotes_lang;
                lex >> quotes_lang;