X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraph.cpp;h=d96ddaeefea3d282cfab127f0add726f1b00e116;hb=8693ae474be667e88dba1e53a5a1130ff440e756;hp=720e3a7448f1ff864521d9558daf109b154ed616;hpb=cc7db294e207e623a62d3085aa651aff471151e5;p=lyx.git diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 720e3a7448..d96ddaeefe 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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; } @@ -2716,13 +2725,9 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf, Inset const * inset = getInset(i); if (inset) { - InsetCommand const * ic = inset->asInsetCommand(); - InsetLayout const & il = inset->getLayout(); - InsetMath const * im = inset->asInsetMath(); - if (!runparams.for_toc - || im || il.isInToc() || (ic && ic->isInToc())) { + if (!runparams.for_toc || inset->isInToc()) { OutputParams np = runparams; - if (!il.htmlisblock()) + if (!inset->getLayout().htmlisblock()) np.html_in_par = true; retval += inset->xhtml(xs, np); }