]> git.lyx.org Git - features.git/commitdiff
Fix lineno options param
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 2 Jun 2019 17:07:01 +0000 (19:07 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:32 +0000 (15:48 +0200)
This has been written even if empty -- and thus caused reading errors.

lib/doc/Customization.lyx
lib/doc/UserGuide.lyx
lib/doc/de/Customization.lyx
lib/doc/de/UserGuide.lyx
lib/lyx2lyx/lyx_2_4.py
src/BufferParams.cpp

index d8475feb7f062993ff1f02574aa6c9e30e5d7b3e..af95f4db37a208889fbc667540e9f28fc7989b0d 100644 (file)
@@ -103,7 +103,6 @@ logicalmkup
 \use_refstyle 0
 \use_minted 0
 \use_lineno 0
-\lineno_options 
 \notefontcolor #0000ff
 \branch OutDated
 \selected 0
index 6d27840353510733887781aa33f89eeb31c0e6b8..48dd928789c86880b70eff5d5fbc8d1742a16b06 100644 (file)
@@ -118,7 +118,6 @@ logicalmkup
 \use_refstyle 1
 \use_minted 0
 \use_lineno 0
-\lineno_options 
 \notefontcolor #0000ff
 \branch Question
 \selected 1
index f838e20c5448f3ec2b42499034b496c2b5c82b3a..f1cde430279b9b561a25167c5facb21fe13b1d88 100644 (file)
@@ -111,7 +111,6 @@ logicalmkup
 \use_refstyle 0
 \use_minted 0
 \use_lineno 0
-\lineno_options 
 \notefontcolor #0000ff
 \branch OutDated
 \selected 0
index 29fe9bb51a85389565e1cd3c27a62c766e3721a2..814443f6c95aeea6b59bf2cb9e2d899ecee196ea 100644 (file)
@@ -123,7 +123,6 @@ logicalmkup
 \use_refstyle 1
 \use_minted 0
 \use_lineno 0
-\lineno_options 
 \notefontcolor #0000ff
 \branch Frage
 \selected 1
index 61d45f282b0371fe370883ddaf39070c59069a6b..41c4324013274b5050f3edc73c0bb585eb0f957d 100644 (file)
@@ -1721,8 +1721,11 @@ def convert_lineno(document):
             del_token(document.preamble, "% Added by lyx2lyx", j-2, j-1)
 
     k = find_token(document.header, "\\index ")
-    document.header[k:k] = ["\\use_lineno %d" % use_lineno,
-                            "\\lineno_options %s" % options]
+    if options == "":
+        document.header[k:k] = ["\\use_lineno %d" % use_lineno]
+    else:
+        document.header[k:k] = ["\\use_lineno %d" % use_lineno,
+                                "\\lineno_options %s" % options]
 
 
 ##
index dbe5d7fc279b0b6d902297185815aedbb08e3fec..3d9f71727559ca294d9c4969ddebf6662451c540 100644 (file)
@@ -1329,7 +1329,8 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
           << "\n\\use_lineno " << use_lineno
           << '\n';
 
-        os << "\\lineno_options " << lineno_opts << '\n';
+       if (!lineno_opts.empty())
+               os << "\\lineno_options " << lineno_opts << '\n';
 
        if (isbackgroundcolor == true)
                os << "\\backgroundcolor " << lyx::X11hexname(backgroundcolor) << '\n';