mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Fix bug 4687
http://bugzilla.lyx.org/show_bug.cgi?id=4687 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25318 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
312bb47dd5
commit
c691839abe
@ -32,8 +32,9 @@
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
#include "support/lassert.h"
|
||||
#include "support/debug.h"
|
||||
#include "support/lassert.h"
|
||||
#include "support/textutils.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
@ -132,10 +133,11 @@ Inset * MathMacro::clone() const
|
||||
|
||||
docstring MathMacro::name() const
|
||||
{
|
||||
if (displayMode_ == DISPLAY_UNFOLDED)
|
||||
if (displayMode_ == DISPLAY_UNFOLDED
|
||||
&& (name_.size() > 1 || (name_[0] != '_' && name_[0] != '^')))
|
||||
return asString(cell(0));
|
||||
else
|
||||
return name_;
|
||||
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
@ -660,7 +662,8 @@ void MathMacro::write(WriteStream & os) const
|
||||
// non-normal mode
|
||||
if (displayMode_ != DISPLAY_NORMAL) {
|
||||
os << "\\" << name();
|
||||
os.pendingSpace(true);
|
||||
if (name().size() != 1 || isAlphaASCII(name()[0]))
|
||||
os.pendingSpace(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user