mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
correct mark of misspelled word if it is the last of paragraph
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38206 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
30339c03ad
commit
242b76f7a5
@ -3781,9 +3781,9 @@ void Paragraph::spellCheck() const
|
||||
bool Paragraph::isMisspelled(pos_type pos, bool check_boundary) const
|
||||
{
|
||||
bool result = SpellChecker::misspelled(d->speller_state_.getState(pos));
|
||||
if (result || pos <= 0 || pos >= size())
|
||||
if (result || pos <= 0 || pos > size())
|
||||
return result;
|
||||
if (check_boundary && isWordSeparator(pos))
|
||||
if (check_boundary && (pos == size() || isWordSeparator(pos)))
|
||||
result = SpellChecker::misspelled(d->speller_state_.getState(pos - 1));
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user