From ca2d972a3650da73afa1ec02ed930001a8a3ea30 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Fri, 9 Jun 2017 12:35:01 +0200 Subject: [PATCH] Amend fd075614 Actually, only when using minted it is not possible to insert a caption in a non-floating listing. --- src/insets/InsetListings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index 7be13bcfbd..84eb4831cb 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -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; }