mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-27 02:19:10 +00:00
Recheck whole buffer after word has been added to/removed from document dic.
This commit is contained in:
parent
5a9c6ce69b
commit
3f2510991d
@ -2755,13 +2755,12 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cur.recordUndoBufferParams();
|
||||
bv->buffer().params().spellignore().push_back(wl);
|
||||
cur.recordUndo();
|
||||
// trigger re-check
|
||||
WordLangTuple wl;
|
||||
docstring_list suggestions;
|
||||
Paragraph const & par = cur.paragraph();
|
||||
pos_type from = cur.pos();
|
||||
pos_type to = from;
|
||||
par.spellCheck(from, to, wl, suggestions, true, true);
|
||||
// trigger re-check of whole buffer
|
||||
ParagraphList & pars = bv->buffer().paragraphs();
|
||||
ParagraphList::iterator pit = pars.begin();
|
||||
ParagraphList::iterator pend = pars.end();
|
||||
for (; pit != pend; ++pit)
|
||||
pit->requestSpellCheck();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2794,13 +2793,12 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cur.recordUndoBufferParams();
|
||||
bv->buffer().params().spellignore().erase(it);
|
||||
cur.recordUndo();
|
||||
// trigger re-check
|
||||
WordLangTuple wl;
|
||||
docstring_list suggestions;
|
||||
Paragraph const & par = cur.paragraph();
|
||||
pos_type from = cur.pos();
|
||||
pos_type to = from;
|
||||
par.spellCheck(from, to, wl, suggestions, true, true);
|
||||
// trigger re-check of whole buffer
|
||||
ParagraphList & pars = bv->buffer().paragraphs();
|
||||
ParagraphList::iterator pit = pars.begin();
|
||||
ParagraphList::iterator pend = pars.end();
|
||||
for (; pit != pend; ++pit)
|
||||
pit->requestSpellCheck();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user