}
+Undo const & Buffer::undo() const
+{
+ return d->undo_;
+}
+
+
void Buffer::setChild(DocIterator const & dit, Buffer * child)
{
d->children_positions[child] = dit;
///
Undo & undo();
+ ///
+ Undo const & undo() const;
/// This function is called when the buffer is changed.
void changed(bool update_metrics) const;
}
+bool BufferView::busy() const
+{
+ return buffer().undo().activeUndoGroup();
+}
+
+
void BufferView::draw(frontend::Painter & pain, bool paint_caret)
{
if (height_ == 0 || width_ == 0)
/// the shape of the caret
frontend::CaretGeometry const & caretGeometry() const;
+ /// Returns true when the BufferView is not ready for drawing
+ bool busy() const;
///
void draw(frontend::Painter & pain, bool paint_caret);
#include "LyXVC.h"
#include "Text.h"
#include "TextMetrics.h"
-#include "Undo.h"
#include "version.h"
#include "support/convert.h"
// Don't start blinking if the cursor isn't on screen, unless we
// are not ready to know whether the cursor is on screen.
- if (!d->buffer_view_->buffer().undo().activeUndoGroup()
- && !d->buffer_view_->caretInView())
+ if (!d->buffer_view_->busy() && !d->buffer_view_->caretInView())
return;
d->showCaret();
{
// we cannot update geometry if not ready and we do not need to if
// caret is not in view.
- if (buffer_view_->buffer().undo().activeUndoGroup()
- || !buffer_view_->caretInView())
+ if (buffer_view_->busy() || !buffer_view_->caretInView())
return;
// Do not trigger the painting machinery if we are not ready (see
// bug #10989). The second test triggers when in the middle of a
// dispatch operation.
- if (view().busy() || d->buffer_view_->buffer().undo().activeUndoGroup()) {
+ if (view().busy() || d->buffer_view_->busy()) {
// Since the screen may have turned black at this point, our
// backing store has to be copied to screen. This is a no-op
// except when our drawing strategy is "backingstore" (macOS,