make sure that word at cursor position is checked too. (bug 2063)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10523 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-10-05 12:00:03 +00:00
parent 0385c00f3e
commit 141e4d0e7b
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-10-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* ControlSpellchecker.C (check): make sure that word at cursor
position is checked too. (bug 2063)
2005-10-03 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* Dialog.C (checkStatus): update dialog after checkReadOnly has

View File

@ -190,6 +190,9 @@ void ControlSpellchecker::check()
SpellBase::Result res = SpellBase::OK;
DocIterator cur = kernel().bufferview()->cursor();
while (cur && cur.pos() && isLetter(cur)) {
cur.backwardPos();
}
ptrdiff_t start = 0, total = 0;
DocIterator it = DocIterator(kernel().buffer().inset());
@ -199,9 +202,6 @@ void ControlSpellchecker::check()
for (total = start; it; it.forwardPos())
++total;
for (; cur && cur.pos() && isLetter(cur); cur.forwardPos())
++start;
BufferParams & bufferparams = kernel().buffer().params();
exitEarly_ = false;