From 2e04ee3317e993583958edcb6f20fed70475971c Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 20 Feb 2007 09:32:12 +0000 Subject: [PATCH] * lib/lyx2lyx/lyx_1_4.py (convert_ert_paragraphs): Fix off-by-one error that causes an out of range error in find_token git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17271 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_4.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/lyx2lyx/lyx_1_4.py b/lib/lyx2lyx/lyx_1_4.py index cd69f9f09a..d5d6b88ecb 100644 --- a/lib/lyx2lyx/lyx_1_4.py +++ b/lib/lyx2lyx/lyx_1_4.py @@ -2298,11 +2298,11 @@ def convert_ert_paragraphs(document): if k == -1: break document.body[k:k+1] = ["\\end_layout", "", '\\begin_layout %s' % document.default_layout] - k = k + 4 - j = j + 3 + k = k + 3 + j = j + 2 # We need an empty line if document.default_layout == '' - if document.body[k-1] != '': - document.body.insert(k-1, '') + if document.body[k] != '': + document.body.insert(k, '') k = k + 1 j = j + 1 i = i + 1 -- 2.39.2