mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Make autocorrect (still disabled) better. Now switched
on/off by !/space. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28008 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5b678eefc2
commit
823e27f465
@ -633,7 +633,6 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
// Now that we know exactly what we want to do, let's do it!
|
||||
cur.selHandle(select);
|
||||
cur.autocorrect() = false;
|
||||
cur.clearTargetX();
|
||||
cur.macroModeClose();
|
||||
// try moving forward or backwards as necessary...
|
||||
@ -1525,8 +1524,14 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
|
||||
|
||||
#ifdef AUTOCORRECT
|
||||
// leave autocorrect mode if necessary
|
||||
if (cur.autocorrect() && c == ' ') {
|
||||
if (c == ' ' && cur.autocorrect()) {
|
||||
cur.autocorrect() = false;
|
||||
cur.message(_("Autocorrect Off ('!' to enter)"));
|
||||
return true;
|
||||
}
|
||||
if (c == '!' && !cur.autocorrect()) {
|
||||
cur.autocorrect() = true;
|
||||
cur.message(_("Autocorrect On (<space> to exit)"));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@ -1634,7 +1639,12 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
|
||||
|
||||
// no special circumstances, so insert the character without any fuss
|
||||
cur.insert(c);
|
||||
cur.autocorrect() = true;
|
||||
#ifdef AUTOCORRECT
|
||||
if (!cur.autocorrect())
|
||||
cur.message(_("Autocorrect Off ('!' to enter)"));
|
||||
else
|
||||
cur.message(_("Autocorrect On (<space> to exit)"));
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user