]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
* GuiDocument.cpp (less_textclass_avail_desc):
[lyx.git] / src / BufferView.cpp
index c9b03bd607068679b1b39284af7d616bfd251b63..314631cadd0ec344868a6bee54ab2156f19879e8 100644 (file)
@@ -1154,11 +1154,15 @@ bool BufferView::dispatch(FuncRequest const & cmd)
 
        case LFUN_CHANGE_NEXT:
                findNextChange(this);
+               // FIXME: Move this LFUN to Buffer so that we don't have to do this:
+               processUpdateFlags(Update::Force | Update::FitCursor);
                break;
 
        case LFUN_CHANGES_MERGE:
-               if (findNextChange(this))
+               if (findNextChange(this)) {
+                       processUpdateFlags(Update::Force | Update::FitCursor);
                        showDialog("changes");
+               }
                break;
 
        case LFUN_ALL_CHANGES_ACCEPT:
@@ -1742,15 +1746,14 @@ void BufferView::setCursorFromRow(int row)
 bool BufferView::setCursorFromInset(Inset const * inset)
 {
        // are we already there?
-       if (&cursor().inset() == inset || cursor().nextInset() == inset)
+       if (cursor().nextInset() == inset)
                return true;
 
        // Inset is not at cursor position. Find it in the document.
        Cursor cur(*this);
        cur.reset(buffer().inset());
-       do 
+       while (cur && cur.nextInset() != inset)
                cur.forwardInset();
-       while (cur && cur.nextInset() != inset);
 
        if (cur) {
                setCursor(cur);
@@ -2221,7 +2224,7 @@ void BufferView::draw(frontend::Painter & pain)
 
                // Clear background.
                pain.fillRectangle(0, 0, width_, height_,
-                       buffer_.inset().backgroundColor());
+                       pi.backgroundColor(&buffer_.inset()));
 
                // Draw everything.
                tm.draw(pi, 0, y);