Fix lineno options param

This has been written even if empty -- and thus caused reading errors.
This commit is contained in:
Juergen Spitzmueller 2019-06-02 19:07:01 +02:00
parent a810d779d7
commit d2b6232ce7
6 changed files with 7 additions and 7 deletions

View File

@ -103,7 +103,6 @@ logicalmkup
\use_refstyle 0
\use_minted 0
\use_lineno 0
\lineno_options
\notefontcolor #0000ff
\branch OutDated
\selected 0

View File

@ -118,7 +118,6 @@ logicalmkup
\use_refstyle 1
\use_minted 0
\use_lineno 0
\lineno_options
\notefontcolor #0000ff
\branch Question
\selected 1

View File

@ -111,7 +111,6 @@ logicalmkup
\use_refstyle 0
\use_minted 0
\use_lineno 0
\lineno_options
\notefontcolor #0000ff
\branch OutDated
\selected 0

View File

@ -123,7 +123,6 @@ logicalmkup
\use_refstyle 1
\use_minted 0
\use_lineno 0
\lineno_options
\notefontcolor #0000ff
\branch Frage
\selected 1

View 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]
##

View 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';