#include "kbmap.h"
#include "lyxrow.h"
#include "bufferlist.h"
+#include "buffer.h"
#include "BufferView.h"
#include "lyxserver.h"
#include "intl.h"
// 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) {
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;
&& 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();