return result;
locateWord(from, to, WHOLE_WORD);
- if (from == to || from >= pos_type(d->text_.size()))
+ if (from == to || from >= size())
return result;
docstring word = asString(from, to, AS_STR_INSETS);
result = speller->check(wl);
if (SpellChecker::misspelled(result) && trailing_dot) {
word = word.append(from_ascii("."));
+ wl = WordLangTuple(word, lang);
result = speller->check(wl);
+ if (!SpellChecker::misspelled(result)) {
+ LYXERR(Debug::GUI, "misspelled word now correct was: \"" <<
+ word << "\" [" <<
+ from << ".." << to << "]");
+ }
}
}
d->setMisspelled(from, to, result);