]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
* LaTeXFeatures.cpp (getI18nPreamble):
[lyx.git] / src / Paragraph.cpp
index 7d50462e0bd36d7d638445a743f5f71a4a3033b3..e8cc2fa162efd181a0986cb8b279ec0ec1cf0a65 100644 (file)
@@ -2850,6 +2850,14 @@ bool Paragraph::isWordSeparator(pos_type pos) const
        if (pos == size())
                return true;
        char_type const c = d->text_[pos];
+       // if we have a hard hyphen (no en- or emdash),
+       // we pass this to the spell checker
+       if (c == '-') {
+               int j = pos + 1;
+               if ((j == size() || d->text_[j] != '-')
+                   && (pos == 0 || d->text_[pos - 1] != '-'))
+                       return false;
+       }
        // We want to pass the ' and escape chars to the spellchecker
        static docstring const quote = from_utf8(lyxrc.spellchecker_esc_chars + '\'');
        return (!isLetterChar(c) && !isDigitASCII(c) && !contains(quote, c));