mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
try to get same behaviour as in 1.1.6 when typing \macro{
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3856 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1c77a120de
commit
ccd47b1fec
@ -634,14 +634,15 @@ bool MathCursor::toggleLimits()
|
|||||||
|
|
||||||
void MathCursor::macroModeClose()
|
void MathCursor::macroModeClose()
|
||||||
{
|
{
|
||||||
|
MathInset::difference_type const t = macroNamePos();
|
||||||
|
if (t == -1)
|
||||||
|
return;
|
||||||
string s = macroName();
|
string s = macroName();
|
||||||
if (s.size()) {
|
array().erase(t, pos());
|
||||||
size_type old = pos();
|
pos() = t;
|
||||||
pos() -= s.size();
|
if (s != "\\")
|
||||||
array().erase(pos(), old);
|
|
||||||
interpret(s);
|
interpret(s);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MathInset::difference_type MathCursor::macroNamePos() const
|
MathInset::difference_type MathCursor::macroNamePos() const
|
||||||
@ -1462,18 +1463,10 @@ bool MathCursor::interpret(char c)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == "\\") {
|
|
||||||
insert(c, LM_TC_TEX);
|
|
||||||
macroModeClose();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
macroModeClose();
|
macroModeClose();
|
||||||
|
|
||||||
if (c == '\\')
|
if (c != ' ')
|
||||||
insert(c, LM_TC_TEX);
|
interpret(c);
|
||||||
else if (c != ' ')
|
|
||||||
insert(c, lastcode_);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user