From b6f9724ac1a2da4f46e1d59d2f6022f93c09b856 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 17 Apr 2019 18:08:46 +0200 Subject: [PATCH] Amend [f2029fb3/lyxgit] The fix for #11552 was reintroducing #9348. This commit makes sure it stays fixed. --- src/mathed/MathParser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index f0d1d7c535..65ef72300b 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -946,7 +946,11 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags, parse(ar, FLAG_BRACE_LAST, mode); // do not create a BraceInset if they were written by LyX // this helps to keep the annoyance of "a choose b" to a minimum - if (ar.size() == 1 && (ar[0]->extraBraces() || ar[0]->asBraceInset())) + // But create a BraceInset if a script follows (#9348) + InsetMathBrace const * mb = ar[0]->asBraceInset(); + if (ar.size() == 1 && (ar[0]->extraBraces() + || (mb && mb->cell(0).size() + && !mb->cell(0)[0].nucleus()->asScriptInset()))) cell->append(ar); else cell->push_back(MathAtom(new InsetMathBrace(ar))); -- 2.39.5