commit 17ea71b31c6b5708241d8a9d2ca5afd331446c1c
Author: Enrico Forestieri <for...@lyx.org>
Date:   Sat May 19 21:33:29 2018 +0200

    Fix bug #11151
---
 src/BufferParams.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 6d52731..76a2c62 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2267,16 +2267,16 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
        if (!listings_params.empty()
            || features.mustProvide("listings")
            || features.mustProvide("minted")) {
-               if (features.mustProvide("listings"))
-                       os << "\\usepackage{listings}\n";
-               else
+               if (use_minted)
                        os << "\\usepackage{minted}\n";
+               else
+                       os << "\\usepackage{listings}\n";
        }
        if (!listings_params.empty()) {
-               if (features.mustProvide("listings"))
-                       os << "\\lstset{";
-               else
+               if (use_minted)
                        os << "\\setminted{";
+               else
+                       os << "\\lstset{";
                // do not test validity because listings_params is
                // supposed to be valid
                string par =

Reply via email to