X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCommand.cpp;h=7693d08fd7c70010f323eddd24956697932d09fd;hb=71b8019d56142397994e0ef2d4244ada51f199d5;hp=fe10466e238b43b36f1c3796e10d997ea9a2c6e7;hpb=b58dcff836f9eb4507df81abffd83e2bfac2b3d0;p=lyx.git diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index fe10466e23..7693d08fd7 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -15,6 +15,7 @@ #include "Buffer.h" #include "BufferEncodings.h" +#include "BufferParams.h" #include "BufferView.h" #include "Cursor.h" #include "DispatchResult.h" @@ -43,12 +44,14 @@ #include "support/debug.h" #include "support/gettext.h" +#include "support/lstrings.h" #include "frontends/Application.h" #include using namespace std; +using namespace lyx::support; namespace lyx { @@ -139,7 +142,11 @@ void InsetCommand::setParams(InsetCommandParams const & p) void InsetCommand::latex(otexstream & os, OutputParams const & runparams_in) const { OutputParams runparams = runparams_in; - os << getCommand(runparams); + docstring command = getCommand(runparams); + if (buffer().params().use_minted + && prefixIs(command, from_ascii("\\lstlistoflistings"))) + command.erase(1, 3); + os << command; } @@ -342,7 +349,7 @@ bool decodeInsetParam(string const & name, string & data, break; } case ERT_CODE: { - data = InsetERT::params2string(InsetCollapsable::Open); + data = InsetERT::params2string(InsetCollapsible::Open); break; } case EXTERNAL_CODE: {