if (range_.first > pos) {
range_.first += offset;
range_.last += offset;
- } else if (range_.last > pos) {
+ } else if (range_.last >= pos) {
range_.last += offset;
}
}
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) {
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));
int i = 0;
pos_type const parsize = d->text_.size();
for (i = 0; i < strsize && pos < parsize; ++i, ++pos) {
- // Ignore ligature break and hyphenation chars while searching
+ // Ignore "invisible" letters such as ligature breaks
+ // and hyphenation chars while searching
while (pos < parsize - 1 && isInset(pos)) {
- if (!getInset(pos)->skipOnSearch())
+ odocstringstream os;
+ getInset(pos)->toString(os);
+ if (!getInset(pos)->isLetter() || !os.str().empty())
break;
pos++;
}