]> git.lyx.org Git - features.git/blobdiff - src/BufferView.C
hide cursor and selection anchor behind accessor function
[features.git] / src / BufferView.C
index 3d3b86e8b016224531ac2133c5e4b929b9803000..062bd2854de5cfd65d268a8698488e371c8d87a6 100644 (file)
@@ -316,7 +316,7 @@ void BufferView::gotoLabel(string const & label)
                        text()->setCursor(
                                std::distance(text()->paragraphs().begin(), it.getPar()),
                                it.getPos());
-                       text()->selection.cursor = text()->cursor;
+                       text()->anchor() = text()->cursor();
                        update();
                        return;
                }
@@ -418,7 +418,7 @@ Encoding const * BufferView::getEncoding() const
                return 0;
        return t->cursorPar()->getFont(
                buffer()->params(),
-               t->cursor.pos(),
+               t->cursor().pos(),
                outerFont(t->cursorPar(), t->paragraphs())
        ).language()->encoding();
 }