From 78ded48a224f3524903aecc922257c87be09eaeb Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Fri, 17 Sep 2010 17:39:18 +0000 Subject: [PATCH] make a second try for misspelled words to catch abbreviations git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35427 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 7efa38e6f1..b12d7add2b 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -3488,8 +3488,14 @@ SpellChecker::Result Paragraph::spellCheck(pos_type & from, pos_type & to, // Ignore words with digits // FIXME: make this customizable // (note that some checkers ignore words with digits by default) - if (!hasDigit(word)) + if (!hasDigit(word)) { + bool const trailing_dot = to < size() && d->text_[to] == '.'; result = speller->check(wl); + if (SpellChecker::misspelled(result) && trailing_dot) { + word = word.append(from_ascii(".")); + result = speller->check(wl); + } + } d->setMisspelled(from, to, result); } else { result = d->speller_state_.getState(from); -- 2.39.5