mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
next try to fix the 'C-m 11' problem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3287 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
00af0cdf35
commit
a8af2d353d
@ -30,7 +30,7 @@ MathCharInset::MathCharInset(char c, MathTextCodes t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MathTextCodes MathCharInset::nativeCode(char c) const
|
MathTextCodes MathCharInset::nativeCode(char c)
|
||||||
{
|
{
|
||||||
if (isalpha(c))
|
if (isalpha(c))
|
||||||
return LM_TC_VAR;
|
return LM_TC_VAR;
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
///
|
///
|
||||||
MathInset * clone() const;
|
MathInset * clone() const;
|
||||||
///
|
///
|
||||||
MathTextCodes nativeCode(char c) const;
|
static MathTextCodes nativeCode(char c);
|
||||||
///
|
///
|
||||||
void metrics(MathMetricsInfo const & st) const;
|
void metrics(MathMetricsInfo const & st) const;
|
||||||
///
|
///
|
||||||
|
@ -168,7 +168,7 @@ Selection theSelection;
|
|||||||
|
|
||||||
|
|
||||||
MathCursor::MathCursor(InsetFormulaBase * formula, bool left)
|
MathCursor::MathCursor(InsetFormulaBase * formula, bool left)
|
||||||
: formula_(formula), lastcode_(LM_TC_VAR), selection_(false)
|
: formula_(formula), lastcode_(LM_TC_MIN), selection_(false)
|
||||||
{
|
{
|
||||||
left ? first() : last();
|
left ? first() : last();
|
||||||
}
|
}
|
||||||
@ -300,11 +300,11 @@ bool MathCursor::left(bool sel)
|
|||||||
dump("Left 1");
|
dump("Left 1");
|
||||||
if (inMacroMode()) {
|
if (inMacroMode()) {
|
||||||
macroModeClose();
|
macroModeClose();
|
||||||
lastcode_ = LM_TC_VAR;
|
lastcode_ = LM_TC_MIN;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
selHandle(sel);
|
selHandle(sel);
|
||||||
lastcode_ = LM_TC_VAR;
|
lastcode_ = LM_TC_MIN;
|
||||||
|
|
||||||
if (hasPrevAtom() && openable(prevAtom(), sel)) {
|
if (hasPrevAtom() && openable(prevAtom(), sel)) {
|
||||||
if (prevAtom()->isHyperActive()) {
|
if (prevAtom()->isHyperActive()) {
|
||||||
@ -323,11 +323,11 @@ bool MathCursor::right(bool sel)
|
|||||||
dump("Right 1");
|
dump("Right 1");
|
||||||
if (inMacroMode()) {
|
if (inMacroMode()) {
|
||||||
macroModeClose();
|
macroModeClose();
|
||||||
lastcode_ = LM_TC_VAR;
|
lastcode_ = LM_TC_MIN;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
selHandle(sel);
|
selHandle(sel);
|
||||||
lastcode_ = LM_TC_VAR;
|
lastcode_ = LM_TC_MIN;
|
||||||
|
|
||||||
if (hasNextAtom() && openable(nextAtom(), sel)) {
|
if (hasNextAtom() && openable(nextAtom(), sel)) {
|
||||||
if (nextAtom()->isHyperActive()) {
|
if (nextAtom()->isHyperActive()) {
|
||||||
@ -396,7 +396,7 @@ void MathCursor::home(bool sel)
|
|||||||
dump("home 1");
|
dump("home 1");
|
||||||
selHandle(sel);
|
selHandle(sel);
|
||||||
macroModeClose();
|
macroModeClose();
|
||||||
lastcode_ = LM_TC_VAR;
|
lastcode_ = LM_TC_MIN;
|
||||||
if (!par()->idxHome(idx(), pos()))
|
if (!par()->idxHome(idx(), pos()))
|
||||||
popLeft();
|
popLeft();
|
||||||
dump("home 2");
|
dump("home 2");
|
||||||
@ -408,7 +408,7 @@ void MathCursor::end(bool sel)
|
|||||||
dump("end 1");
|
dump("end 1");
|
||||||
selHandle(sel);
|
selHandle(sel);
|
||||||
macroModeClose();
|
macroModeClose();
|
||||||
lastcode_ = LM_TC_VAR;
|
lastcode_ = LM_TC_MIN;
|
||||||
if (!par()->idxEnd(idx(), pos()))
|
if (!par()->idxEnd(idx(), pos()))
|
||||||
popRight();
|
popRight();
|
||||||
dump("end 2");
|
dump("end 2");
|
||||||
@ -1412,7 +1412,7 @@ bool MathCursor::interpret(char c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// no special circumstances, so insert the character without any fuss
|
// no special circumstances, so insert the character without any fuss
|
||||||
insert(c, lastcode_);
|
insert(c, lastcode_ == LM_TC_MIN ? MathCharInset::nativeCode(c) : lastcode_);
|
||||||
lastcode_ = LM_TC_MIN;
|
lastcode_ = LM_TC_MIN;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user