]> git.lyx.org Git - features.git/commitdiff
Second part of bug 4050 fix
authorJosé Matox <jamatos@lyx.org>
Sun, 22 Jul 2007 20:10:28 +0000 (20:10 +0000)
committerJosé Matox <jamatos@lyx.org>
Sun, 22 Jul 2007 20:10:28 +0000 (20:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19168 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_5.py

index 21320cf4a0e41c415353ab5d918b3bf738931c98..6c4c80668568e584e5e457c4c6f623339a2e0e8c 100644 (file)
@@ -1226,10 +1226,7 @@ def revert_accent(document):
                     if j < len(document.body[i]) - 1:
                         document.body.insert(i+1, document.body[i][j+1:])
                     # Delete the accented character
-                    if j > 0:
-                        document.body[i] = document.body[i][:j-1]
-                    else:
-                        document.body[i] = u''
+                    document.body[i] = document.body[i][:j]
                     # Finally add the InsetLaTeXAccent
                     document.body[i] += "\\i \\%s{}" % inverse_special_accent_map[accent]
                     break
@@ -1248,10 +1245,7 @@ def revert_accent(document):
                     if j < len(document.body[i]) - 1:
                         document.body.insert(i+1, document.body[i][j+1:])
                     # Delete the accented characters
-                    if j > 1:
-                        document.body[i] = document.body[i][:j-1]
-                    else:
-                        document.body[i] = u''
+                    document.body[i] = document.body[i][:j-1]
                     # Finally add the InsetLaTeXAccent
                     document.body[i] += "\\i \\%s{%s}" % (inverse_accent_map[accent], accented_char)
                     break