Fix #1333459 [Edit Book: Starting mdash breaks spellchecking](https://bugs.launchpad.net/calibre/+bug/1333459)

(regression introduced by performance optimizations from yesterday)
This commit is contained in:
Kovid Goyal 2014-06-24 10:16:04 +05:30
parent bca2e2ad7e
commit bf59c9c4da

View File

@ -245,7 +245,7 @@ def check_spelling(text, tpos, tlen, fmt, locale, sfmt):
if start > ppos: if start > ppos:
split_ans.append((start - ppos, fmt)) split_ans.append((start - ppos, fmt))
ppos = start + length ppos = start + length
recognized = dictionaries.recognized(text[tpos + start:ppos], locale) recognized = dictionaries.recognized(text[tpos + start:tpos + ppos], locale)
if recognized: if recognized:
split_ans.append((length, fmt)) split_ans.append((length, fmt))
else: else: