Actually, only when using minted it is not possible to insert a
caption in a non-floating listing.
This commit is contained in:
Enrico Forestieri 2017-06-09 12:35:01 +02:00
parent 183c97d8a8
commit ca2d972a36

View 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;
}