]> git.lyx.org Git - lyx.git/commitdiff
Code simplification (thx Vincent).
authorTommaso Cucinotta <tommaso@lyx.org>
Fri, 28 Jan 2011 09:52:12 +0000 (09:52 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Fri, 28 Jan 2011 09:52:12 +0000 (09:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37341 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp

index c641172640d487787cb039e1f573d8cf4e2a0268..211b8ebacbf1f379e5a6e6fa664db2c3ab878713 100644 (file)
@@ -1341,13 +1341,11 @@ int Cursor::niceInsert(docstring const & t, Parse::flags f, bool enter)
 {
        MathData ar(buffer());
        asArray(t, ar, f);
-       if (ar.size() == 1 && (enter || selection())) {
+       if (ar.size() == 1 && (enter || selection()))
                niceInsert(ar[0]);
-               return 1;
-       } else {
+       else
                insert(ar);
-               return ar.size();
-       }
+       return ar.size();
 }