mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
Better fix for bug #6270. The outer braces are swallowed only for user
defined macros, so better use a brace inset only when strictly needed. No status.16x line is necessary. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31871 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ce3fda9266
commit
d3e25253c3
@ -1448,8 +1448,7 @@ bool Cursor::macroModeClose()
|
||||
InsetMathUnknown * p = activeMacro();
|
||||
p->finalize();
|
||||
MathData selection;
|
||||
// enclose selection in braces (bug #6270)
|
||||
asArray('{' + p->selection() + '}', selection);
|
||||
asArray(p->selection(), selection);
|
||||
docstring const s = p->name();
|
||||
--pos();
|
||||
cell().erase(pos());
|
||||
@ -1492,7 +1491,7 @@ bool Cursor::macroModeClose()
|
||||
|
||||
// finally put the macro argument behind, if needed
|
||||
if (macroArg) {
|
||||
if (selection.size() > 1)
|
||||
if (selection.size() > 1 || selection[0]->asScriptInset())
|
||||
plainInsert(MathAtom(new InsetMathBrace(selection)));
|
||||
else
|
||||
insert(selection);
|
||||
|
Loading…
Reference in New Issue
Block a user