]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
remove obsolete comment
[lyx.git] / src / BufferView.C
index 94c5712b26128a6c7c1a48841c75eefbdad8c71b..b1cfd99a49c111856ec1b9f8a51266cdea1cf0b1 100644 (file)
@@ -335,6 +335,10 @@ bool BufferView::multiParSel()
 
 bool BufferView::update(Update::flags flags)
 {
+       // last_inset_ points to the last visited inset. This pointer may become
+       // invalid becuase of keyboard editing. Since all such operations
+       // causes screen update(), I reset last_inset_ to avoid such a problem.
+       last_inset_ = 0;
        // This is close to a hot-path.
        if (lyxerr.debugging(Debug::DEBUG)) {
                lyxerr[Debug::DEBUG]
@@ -577,7 +581,6 @@ void BufferView::center()
        CursorSlice & bot = cursor_.bottom();
        TextMetrics & tm = text_metrics_[bot.text()];
        pit_type const pit = bot.pit();
-       int max_width = workWidth();
        tm.redoParagraph(pit);
        ParagraphMetrics const & pm = tm.parMetrics(pit);
        anchor_ref_ = pit;