]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Improve conversion error message.
[lyx.git] / src / Paragraph.cpp
index 7d50462e0bd36d7d638445a743f5f71a4a3033b3..5b397bd8778fbeba1d3c8f759f9bf318b1794e44 100644 (file)
@@ -2375,8 +2375,8 @@ void Paragraph::latex(BufferParams const & bparams,
                                                            runparams);
                }
 
-               Change const & change = runparams.inDeletedInset ? runparams.changeOfDeletedInset
-                                                                : lookupChange(i);
+               Change const & change = runparams.inDeletedInset
+                       ? runparams.changeOfDeletedInset : lookupChange(i);
 
                if (bparams.outputChanges && runningChange != change) {
                        if (open_font) {
@@ -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));