mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Fix, but keep disabled, mathed autocorrect
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27927 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
96b062a520
commit
d6f30aac95
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
//#define AUTOCORRECT
|
||||||
|
|
||||||
#include "InsetMathNest.h"
|
#include "InsetMathNest.h"
|
||||||
|
|
||||||
#include "InsetMathArray.h"
|
#include "InsetMathArray.h"
|
||||||
@ -25,6 +27,9 @@
|
|||||||
#include "InsetMathSpace.h"
|
#include "InsetMathSpace.h"
|
||||||
#include "InsetMathSymbol.h"
|
#include "InsetMathSymbol.h"
|
||||||
#include "InsetMathUnknown.h"
|
#include "InsetMathUnknown.h"
|
||||||
|
#ifdef AUTOCORRECT
|
||||||
|
#include "MathAutoCorrect.h"
|
||||||
|
#endif
|
||||||
#include "MathCompletionList.h"
|
#include "MathCompletionList.h"
|
||||||
#include "MathData.h"
|
#include "MathData.h"
|
||||||
#include "MathFactory.h"
|
#include "MathFactory.h"
|
||||||
@ -1513,10 +1518,10 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
|
|||||||
// This is annoying as one has to press <space> far too often.
|
// This is annoying as one has to press <space> far too often.
|
||||||
// Disable it.
|
// Disable it.
|
||||||
|
|
||||||
#if 0
|
#ifdef AUTOCORRECT
|
||||||
// leave autocorrect mode if necessary
|
// leave autocorrect mode if necessary
|
||||||
if (autocorrect() && c == ' ') {
|
if (cur.autocorrect() && c == ' ') {
|
||||||
autocorrect() = false;
|
cur.autocorrect() = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1616,9 +1621,11 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef AUTOCORRECT
|
||||||
// try auto-correction
|
// try auto-correction
|
||||||
//if (autocorrect() && hasPrevAtom() && math_autocorrect(prevAtom(), c))
|
if (cur.autocorrect() && cur.pos() != 0 && math_autocorrect(cur.prevAtom(), c))
|
||||||
// return true;
|
return true;
|
||||||
|
#endif
|
||||||
|
|
||||||
// no special circumstances, so insert the character without any fuss
|
// no special circumstances, so insert the character without any fuss
|
||||||
cur.insert(c);
|
cur.insert(c);
|
||||||
|
Loading…
Reference in New Issue
Block a user