]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
typo
[lyx.git] / src / Paragraph.cpp
index 720e3a7448f1ff864521d9558daf109b154ed616..a1a0e1b740edad051a32be4b900a1adef0bdca48 100644 (file)
@@ -153,6 +153,12 @@ public:
                needsRefresh(pos);
        }
 
+       void refreshLast(pos_type pos)
+       {
+               if (pos < refresh_.last)
+                       refresh_.last = pos;
+       }
+
        SpellChecker::Result getState(pos_type pos) const
        {
                SpellChecker::Result result = SpellChecker::WORD_OK;
@@ -751,6 +757,8 @@ bool Paragraph::eraseChar(pos_type pos, bool trackChanges)
                if (!change.changed() ||
                      (change.inserted() && !change.currentAuthor())) {
                        setChange(pos, Change(Change::DELETED));
+                       // request run of spell checker
+                       requestSpellCheck(pos);
                        return false;
                }
 
@@ -782,6 +790,7 @@ bool Paragraph::eraseChar(pos_type pos, bool trackChanges)
 
        // Update list of misspelled positions
        d->speller_state_.decreasePosAfterPos(pos);
+       d->speller_state_.refreshLast(size());
 
        return true;
 }