]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
* cosmetic
[lyx.git] / src / BufferView.cpp
index dbe396c0704ab5c678757c3ca2ab37f037497e72..d5ee51739c26aa8ffddf2034d4a96cdb706857d8 100644 (file)
@@ -1802,6 +1802,10 @@ void BufferView::updateMetrics()
        if (d->inlineCompletionPos.fixIfBroken())
                d->inlineCompletionPos = DocIterator();
        
+       if (d->anchor_pit_ >= npit)
+               // The anchor pit must have been deleted...
+               d->anchor_pit_ = npit - 1;
+
        // Rebreak anchor paragraph.
        tm.redoParagraph(d->anchor_pit_);
        ParagraphMetrics & anchor_pm = tm.par_metrics_[d->anchor_pit_];
@@ -2221,7 +2225,7 @@ void BufferView::setInlineCompletion(Cursor & cur, DocIterator const & pos,
        
        // set update flags
        if (changed) {
-               if (singlePar && !(cur.disp_.update() | Update::Force))
+               if (singlePar && !(cur.disp_.update() & Update::Force))
                        cur.updateFlags(cur.disp_.update() | Update::SinglePar);
                else
                        cur.updateFlags(cur.disp_.update() | Update::Force);