From: Tommaso Cucinotta Date: Fri, 28 Jan 2011 09:52:12 +0000 (+0000) Subject: Code simplification (thx Vincent). X-Git-Tag: 2.0.0~990 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e70a79fc0b360bc2166947e641246d03902d9c12;p=features.git Code simplification (thx Vincent). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37341 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index c641172640..211b8ebacb 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -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(); }