]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Do not overwrite read-only files. We now move the file to the backup directory and...
[lyx.git] / src / Text3.cpp
index 41a3fedf6779da8fb0dc797580dbbe3b69bb2cfe..bc1ef41b188c17e8be901ace7b4d9d3c2931d82a 100644 (file)
@@ -1012,7 +1012,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        singleParUpdate = false;
                }
                moveCursor(cur, false);
-               cur.forceBufferUpdate();
                break;
 
        case LFUN_CHAR_DELETE_BACKWARD:
@@ -1030,7 +1029,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        cutSelection(cur, true, false);
                        singleParUpdate = false;
                }
-               cur.forceBufferUpdate();
                break;
 
        case LFUN_BREAK_PARAGRAPH:
@@ -1075,7 +1073,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        if (cur.selection())
                                cutSelection(cur, true, false);
                        cur.insert(inset);
-                       cur.posForward();
+                       if (inset->editable() && inset->asInsetText())
+                               inset->edit(cur, true);
+                       else
+                               cur.posForward();
 
                        // trigger InstantPreview now
                        if (inset->lyxCode() == EXTERNAL_CODE) {
@@ -1618,6 +1619,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_ARGUMENT_INSERT:
        case LFUN_INDEX_INSERT:
        case LFUN_PREVIEW_INSERT:
+       case LFUN_SCRIPT_INSERT:
                // Open the inset, and move the current selection
                // inside it.
                doInsertInset(cur, this, cmd, true, true);
@@ -2452,6 +2454,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_PREVIEW_INSERT:
                code = PREVIEW_CODE;
                break;
+       case LFUN_SCRIPT_INSERT:
+               code = SCRIPT_CODE;
+               break;
 
        case LFUN_MATH_INSERT:
        case LFUN_MATH_AMS_MATRIX: