]> git.lyx.org Git - features.git/blobdiff - src/BufferView2.C
more NEW_INSETS changes, define NEW_MANUBAR as default some other changes, read ChangeLog
[features.git] / src / BufferView2.C
index 723381e34cebd02e064a663d3d02b57bddee8ac9..c8675a0a1cc53abd8751415a4cf1c2bcbb20fa52 100644 (file)
@@ -809,10 +809,16 @@ void BufferView::lockedInsetStoreUndo(Undo::undo_kind kind)
        if (kind == Undo::EDIT) // in this case insets would not be stored!
                kind = Undo::FINISH;
        text->SetUndo(buffer(), kind,
+#ifndef NEW_INSETS
                      text->cursor.par()->
                      ParFromPos(text->cursor.pos())->previous, 
                      text->cursor.par()->
-                     ParFromPos(text->cursor.pos())->next);
+                     ParFromPos(text->cursor.pos())->next
+#else
+                     text->cursor.par()->previous, 
+                     text->cursor.par()->next
+#endif
+               );
 }
 
 
@@ -870,8 +876,13 @@ bool BufferView::ChangeRefs(string const & from, string const & to)
        LyXParagraph * par = buffer()->paragraph;
        LyXCursor cursor = text->cursor;
        LyXCursor tmpcursor = cursor;
+#ifndef NEW_INSETS
        cursor.par(tmpcursor.par()->ParFromPos(tmpcursor.pos()));
        cursor.pos(tmpcursor.par()->PositionInParFromPos(tmpcursor.pos()));
+#else
+       cursor.par(tmpcursor.par());
+       cursor.pos(tmpcursor.pos());
+#endif
 
        while (par) {
                bool flag2 = false;