From: Stephan Witt Date: Fri, 14 Aug 2020 19:28:24 +0000 (+0200) Subject: #6401 more robust processing on special char code insets when looking for spell check... X-Git-Tag: lyx-2.4.0dev-acb2ca7b~396 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5bce66b1a38be7c7e622d57d896e1106ed3b48e0;p=lyx.git #6401 more robust processing on special char code insets when looking for spell checker ranges --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 45cc80ef6a..99ab12967f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -4503,7 +4503,18 @@ Language * Paragraph::Private::locateSpellRange( while (last < to && samelang && sameinset) { // hop to end of word while (last < to && !owner_->isWordSeparator(last)) { - if (owner_->getInset(last)) { + Inset const * inset = owner_->getInset(last); + if (inset && inset->lyxCode() == SPECIALCHAR_CODE) { + // check for "invisible" letters such as ligature breaks + odocstringstream os; + inset->toString(os); + if (os.str().length() != 0) { + // avoid spell check of visible special char insets + // stop the loop in front of the special char inset + sameinset = false; + break; + } + } else if (inset) { appendSkipPosition(skips, last); } else if (owner_->isDeleted(last)) { appendSkipPosition(skips, last);