]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Make lyx2lyx output the new external inset format.
[lyx.git] / src / lyxfunc.C
index bb31273b0b96818ccc71b2cac246e5b292bd1798..7fb2c50776711f42433de0c416f8d3abadd22864 100644 (file)
@@ -15,6 +15,7 @@
 #include "kbmap.h"
 #include "lyxrow.h"
 #include "bufferlist.h"
+#include "buffer.h"
 #include "BufferView.h"
 #include "lyxserver.h"
 #include "intl.h"
@@ -500,7 +501,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                // jump back to owner if an InsetText, so
                // we get back to the InsetTabular or whatever
                if (inset->lyxCode() == Inset::TEXT_CODE)
-                       inset = static_cast<UpdatableInset*>(inset->owner());
+                       inset = inset->owner();
 
                Inset::Code code = inset->lyxCode();
                switch (code) {
@@ -644,9 +645,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        case LFUN_TOC_INSERT:
                code = Inset::TOC_CODE;
                break;
-       case LFUN_PARENTINSERT:
-               code = Inset::PARENT_CODE;
-               break;
        case LFUN_HTMLURL:
        case LFUN_URL:
                code = Inset::URL_CODE;
@@ -836,6 +834,19 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                            && argument.empty()) {
                                argument = encoded_last_key;
                        }
+
+                       // the insets can't try to handle this,
+                       // a table cell in the dummy position will
+                       // lock its insettext, the insettext will
+                       // pass it the bufferview, and succeed,
+                       // so it will stay not locked. Not good
+                       // if we've just done LFUN_ESCAPE (which
+                       // injects an LFUN_PARAGRAPH_UPDATE)
+                       if (action == LFUN_PARAGRAPH_UPDATE) {
+                               view()->dispatch(ev);
+                               goto exit_with_message;
+                       }
+
                        // Undo/Redo is a bit tricky for insets.
                        if (action == LFUN_UNDO) {
                                view()->undo();