[LyX/master] Recheck whole buffer after word has been added to/removed from document dic.
Juergen Spitzmueller
spitz at lyx.org
Sat Aug 21 13:01:05 UTC 2021
commit 3f2510991d230224161309d0198bf0d905cdad75
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Sat Aug 21 15:18:30 2021 +0200
Recheck whole buffer after word has been added to/removed from document dic.
---
src/Text3.cpp | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/Text3.cpp b/src/Text3.cpp
index fcccdd3..b1bf879 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -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;
}
More information about the lyx-cvs
mailing list