Insurance against empty lines.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17146 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2007-02-12 00:19:20 +00:00
parent 60dc3fea2f
commit dc6ed95695

View File

@ -1107,7 +1107,7 @@ def normalize_font_whitespace(document):
if len(words) > 1 and words[0] in char_properties.keys() \
and words[1] == char_properties[words[0]] \
and lines[i-1][-1] == " ":
and lines[i-1] and lines[i-1][-1] == " ":
lines[i-1] = lines[i-1][:-1]
lines[i+1] = " " + lines[i+1]