]> git.lyx.org Git - features.git/commitdiff
make sure that word at cursor position is checked too. (bug 2063)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Oct 2005 12:00:03 +0000 (12:00 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Oct 2005 12:00:03 +0000 (12:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10523 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlSpellchecker.C

index de28200526a02bb8f58dd1416f5ec7d12135ba9d..8c64cb4eb4826180ee6eb8f13f95c9b996f764b9 100644 (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
index 54598fd867e30a86cade833a1c67e335fb8b7271..2e4355965ef0944676d931b71ec73ad04173bf52 100644 (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;