]> git.lyx.org Git - features.git/commitdiff
Fix bug #11151
authorEnrico Forestieri <forenr@lyx.org>
Sat, 19 May 2018 19:33:29 +0000 (21:33 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 19 May 2018 19:33:29 +0000 (21:33 +0200)
src/BufferParams.cpp

index 6d52731f7638381ebf359c1e1d57cb84b1c52881..76a2c6223148cfe71e1262c6bdbfda86b8a90e05 100644 (file)
@@ -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 =