From: Juergen Spitzmueller Date: Sun, 2 Jun 2019 17:07:01 +0000 (+0200) Subject: Fix lineno options param X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=39a0f74db30abc98c3b1fd2ca13f7d81621b6e2d;p=features.git Fix lineno options param This has been written even if empty -- and thus caused reading errors. --- diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index d8475feb7f..af95f4db37 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -103,7 +103,6 @@ logicalmkup \use_refstyle 0 \use_minted 0 \use_lineno 0 -\lineno_options \notefontcolor #0000ff \branch OutDated \selected 0 diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 6d27840353..48dd928789 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -118,7 +118,6 @@ logicalmkup \use_refstyle 1 \use_minted 0 \use_lineno 0 -\lineno_options \notefontcolor #0000ff \branch Question \selected 1 diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index f838e20c54..f1cde43027 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -111,7 +111,6 @@ logicalmkup \use_refstyle 0 \use_minted 0 \use_lineno 0 -\lineno_options \notefontcolor #0000ff \branch OutDated \selected 0 diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index 29fe9bb51a..814443f6c9 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -123,7 +123,6 @@ logicalmkup \use_refstyle 1 \use_minted 0 \use_lineno 0 -\lineno_options \notefontcolor #0000ff \branch Frage \selected 1 diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 61d45f282b..41c4324013 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -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] ## diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index dbe5d7fc27..3d9f717275 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -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';