]> git.lyx.org Git - lyx.git/commitdiff
Amend fd075614
authorEnrico Forestieri <forenr@lyx.org>
Fri, 9 Jun 2017 10:35:01 +0000 (12:35 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Fri, 9 Jun 2017 10:37:05 +0000 (12:37 +0200)
Actually, only when using minted it is not possible to insert a
caption in a non-floating listing.

src/insets/InsetListings.cpp

index 7be13bcfbdc211868be1af509b01f6686a410ec0..84eb4831cb6a843e02509b5054e04b5a25646f3a 100644 (file)
@@ -427,8 +427,9 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
                        return true;
                case LFUN_CAPTION_INSERT: {
                        // the inset outputs at most one caption
-                       if (params().isInline() || !params().isFloat()
-                                               || getCaptionInset()) {
+                       bool const use_minted = buffer().params().use_minted;
+                       if (params().isInline() || getCaptionInset() ||
+                           (use_minted && !params().isFloat())) {
                                status.setEnabled(false);
                                return true;
                        }