]> git.lyx.org Git - lyx.git/commitdiff
Fix the increment of i here.
authorRichard Heck <rgheck@comcast.net>
Sun, 1 Jun 2008 15:01:28 +0000 (15:01 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 1 Jun 2008 15:01:28 +0000 (15:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25055 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index ebce3fa914dcb8c827227f7feaef3045d5e6fee4..6140029e0e75b3c032e059b67829ec75f46ab92f 100644 (file)
@@ -1542,6 +1542,7 @@ def revert_btprintall(document):
                 j = len(document.body)
             # this range isn't really right, but it should be OK, since we shouldn't
             # see more than one matching line in each inset
+            addedlines = 0
             for k in range(i, j):
                 if (document.body[k] == 'btprint "btPrintAll"'):
                     del document.body[k]
@@ -1553,7 +1554,8 @@ def revert_btprintall(document):
                              "\\end_layout",
                              "\\end_inset"]
                     document.body[i:i] = subst
-            i = j
+                    addlines = addedlines + len(subst) - 1
+            i = j + addedlines
 
 
 def revert_bahasam(document):