]> git.lyx.org Git - features.git/blobdiff - src/BufferView.cpp
* Lazy MathData to avoid unneeded interpretation of macro definitions
[features.git] / src / BufferView.cpp
index 511c09fe29bc24acbe733d5c7958384a451a9383..e6b288234662dbe1f4797b369a2907b6e103c3bd 100644 (file)
@@ -349,9 +349,7 @@ void BufferView::processUpdateFlags(Update::flags flags)
                << ", singlepar = " << (flags & Update::SinglePar)
                << "]  buffer: " << &buffer_);
 
-       // Update macro store
-       if (!(cursor().inMathed() && cursor().inMacroMode()))
-               buffer_.updateMacros();
+       buffer_.updateMacros();
 
        // Now do the first drawing step if needed. This consists on updating
        // the CoordCache in updateMetrics().
@@ -427,9 +425,9 @@ void BufferView::updateScrollbar()
        int const parsize = int(t.paragraphs().size());
        if (d->par_height_.size() != parsize) {
                d->par_height_.clear();
-               // FIXME: We assume a default paragraph height of 4 rows. This
+               // FIXME: We assume a default paragraph height of 2 rows. This
                // should probably be pondered with the screen width.
-               d->par_height_.resize(parsize, defaultRowHeight() * 4);
+               d->par_height_.resize(parsize, defaultRowHeight() * 2);
        }
 
        // It would be better to fix the scrollbar to understand
@@ -483,8 +481,8 @@ ScrollbarParameters const & BufferView::scrollbarParameters() const
 void BufferView::scrollDocView(int value)
 {
        int const offset = value - d->scrollbarParameters_.position;
-       //TextMetrics & tm = d->text_metrics_[&buffer_.text()];
-       if (abs(offset) <= 3*height_) {
+       // If the offset is less than 2 screen height, prefer to scroll instead.
+       if (abs(offset) <= 2 * height_) {
                scroll(offset);
                return;
        }