]> git.lyx.org Git - features.git/commitdiff
Insurance against empty lines.
authorJosé Matox <jamatos@lyx.org>
Mon, 12 Feb 2007 00:19:20 +0000 (00:19 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 12 Feb 2007 00:19:20 +0000 (00:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17146 a592a061-630c-0410-9148-cb99ea01b6c8

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]