From dbd4d781dcbe73d347a76fed9ca51faf2841e133 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 29 May 2014 10:55:30 +0200 Subject: [PATCH] Fix an off-by-one error in the reversion of beamer documents. --- lib/lyx2lyx/lyx_2_1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 6752eb9817..a94ef52320 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -3789,12 +3789,12 @@ def revert_newframes(document): continue endseq = j subst = ["\\begin_layout %s" % frame_dict[val]] - esubst = ["\\begin_layout EndFrame", "", "\\end_layout"] + esubst = ["", "\\begin_layout EndFrame", "", "\\end_layout"] endseq = endseq + len(esubst) - len(document.body[j : j]) if document.body[j] == "\\end_deeper": - document.body[j : j] = [""] + esubst - else: document.body[j : j] = esubst + else: + document.body[j+1 : j+1] = esubst for q in range(i, j): if document.body[q] == "\\begin_layout %s" % val: document.body[q] = "\\begin_layout %s" % document.default_layout -- 2.39.2