Enrico Forestieri
2014-05-29 08:58:43 UTC
commit dbd4d781dcbe73d347a76fed9ca51faf2841e133
Date: Thu May 29 10:55:30 2014 +0200
Fix an off-by-one error in the reversion of beamer documents.
Richard, you may want to also cherry-pick this for 2.1 and 2.0.Date: Thu May 29 10:55:30 2014 +0200
Fix an off-by-one error in the reversion of beamer documents.
diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index 6752eb9..a94ef52 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
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])
- document.body[j : j] = [""] + esubst
document.body[j : j] = esubst
+ document.body[j+1 : j+1] = esubst
document.body[q] = "\\begin_layout %s" % document.default_layout
index 6752eb9..a94ef52 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
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])
- document.body[j : j] = [""] + esubst
document.body[j : j] = esubst
+ document.body[j+1 : j+1] = esubst
document.body[q] = "\\begin_layout %s" % document.default_layout
--
Enrico
Enrico