]> git.lyx.org Git - features.git/commitdiff
lyx2lyx: correct placement of (new) local layout
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 23 Aug 2019 16:38:55 +0000 (18:38 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:44 +0000 (15:48 +0200)
This ended up inside modules sometimes.

lib/lyx2lyx/LyX.py

index 22addfb7e02abbc0091bbfc445f0a85ea954a0ed..b91350100e5144c071f4e37a4a03b6a970107a00 100644 (file)
@@ -797,7 +797,7 @@ class LyX_base:
                 # this should not happen
                 self.warning("Malformed LyX document! No \\language header found!")
                 return
-            self.header[k-1 : k-1] = ["\\begin_local_layout", "\\end_local_layout"]
+            self.header[k : k] = ["\\begin_local_layout", "\\end_local_layout"]
             i = k - 1
 
         j = find_end_of(self.header, i, "\\begin_local_layout", "\\end_local_layout")