http://bugzilla.lyx.org/show_bug.cgi?id=3649
Patch attached. OK to commit? Bo
Index: src/insets/InsetListingsParams.h =================================================================== --- src/insets/InsetListingsParams.h (revision 18406) +++ src/insets/InsetListingsParams.h (working copy) @@ -61,6 +61,9 @@ bool isInline() const { return inline_; } /// + bool isFloat() const; + + /// InsetCollapsable::CollapseStatus status() const { return status_; } /// Index: src/insets/InsetListings.cpp =================================================================== --- src/insets/InsetListings.cpp (revision 18406) +++ src/insets/InsetListings.cpp (working copy) @@ -81,7 +81,7 @@ Inset::DisplayType InsetListings::display() const { - return params().isInline() ? Inline : AlignLeft; + return params().isInline() || params().isFloat() ? Inline : AlignLeft; } Index: src/insets/InsetListingsParams.cpp =================================================================== --- src/insets/InsetListingsParams.cpp (revision 18406) +++ src/insets/InsetListingsParams.cpp (working copy) @@ -560,6 +560,12 @@ } +bool InsetListingsParams::isFloat() const +{ + return find(keys_.begin(), keys_.end(), "float") != keys_.end(); +} + + string InsetListingsParams::getParamValue(string const & param) const { // is this parameter defined?