]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListings.cpp
Math.lyx, Tutorial.lyx: fix some typos spotted by a user
[lyx.git] / src / insets / InsetListings.cpp
index 0d61af671a02f8a45877b2011389674da79c13ee..d05c946ea49df9188988c73325f608a0030a2626 100644 (file)
@@ -335,9 +335,12 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
                case LFUN_INSET_DIALOG_UPDATE:
                        status.setEnabled(true);
                        return true;
-               case LFUN_CAPTION_INSERT:
-                       status.setEnabled(!params().isInline());
-                       return true;
+               case LFUN_CAPTION_INSERT: {
+                       if (params().isInline()) {
+                               status.setEnabled(false);
+                               return true;
+                       }
+               }
                default:
                        return InsetCollapsable::getStatus(cur, cmd, status);
        }
@@ -384,7 +387,7 @@ docstring InsetListings::getCaption(OutputParams const & runparams) const
        TexRow texrow;
        odocstringstream ods;
        otexstream os(ods, texrow);
-       ins->getOptArg(os, runparams);
+       ins->getArgs(os, runparams);
        ins->getArgument(os, runparams);
        // the caption may contain \label{} but the listings
        // package prefer caption={}, label={}