]> git.lyx.org Git - features.git/blobdiff - lib/lyx2lyx/lyx_1_5.py
Insurance against empty lines.
[features.git] / lib / lyx2lyx / lyx_1_5.py
index b559850430b87988237a0cb4af77c5e157f8862d..2014f26d25709ead6bba32f4a9f62bbbac256f8d 100644 (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]