]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Add a pending space after math if it is not the last of the selection. This fixes...
[lyx.git] / src / BufferView.cpp
index 936dcffc9af6abe4442a3c424506bd7030a23eef..8b720ba6df2aa0be781832831bb2e47f2ecf7142 100644 (file)
@@ -1019,10 +1019,12 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                break;
 
        case LFUN_DIALOG_SHOW_NEW_INSET:
+               // FIXME: this is wrong, but I do not understand the
+               // intent (JMarc)
                if (cur.inset().lyxCode() == CAPTION_CODE)
                        return cur.inset().getStatus(cur, cmd, flag);
-               flag.setEnabled(cur.inset().lyxCode() != ERT_CODE &&
-                       cur.inset().lyxCode() != LISTINGS_CODE);
+               // FIXME we should consider passthru paragraphs too.
+               flag.setEnabled(!cur.inset().getLayout().isPassThru());
                break;
 
        default: