]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.cpp
Enable dissolve in undefined Flex inset context menu
[lyx.git] / src / insets / InsetCommand.cpp
index fe10466e238b43b36f1c3796e10d997ea9a2c6e7..7693d08fd7c70010f323eddd24956697932d09fd 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "Buffer.h"
 #include "BufferEncodings.h"
+#include "BufferParams.h"
 #include "BufferView.h"
 #include "Cursor.h"
 #include "DispatchResult.h"
 
 #include "support/debug.h"
 #include "support/gettext.h"
+#include "support/lstrings.h"
 
 #include "frontends/Application.h"
 
 #include <sstream>
 
 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: {