X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiWorkArea.cpp;h=95cff6d5ec30f8c7d8de4903e3750115022cff16;hb=b7f6b979d0f889f08e735f35378bb20ba3788b4b;hp=e16ea16e2d413664ee1bf8646b9975cc7905ea73;hpb=aaf96b30250e68b5e54320aa2477f627691835a7;p=lyx.git diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index e16ea16e2d..95cff6d5ec 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -443,12 +443,16 @@ void GuiWorkArea::startBlinkingCaret() if (view().busy()) return; - Point p; - int h = 0; - d->buffer_view_->caretPosAndHeight(p, h); - // Don't start blinking if the cursor isn't on screen. - if (!d->buffer_view_->cursorInView(p, h)) - return; + // we cannot update geometry if not ready and we do not need to if + // caret is not in view. + if (!d->buffer_view_->buffer().undo().activeUndoGroup()) { + Point p; + int h = 0; + d->buffer_view_->caretPosAndHeight(p, h); + // Don't start blinking if the cursor isn't on screen. + if (!d->buffer_view_->cursorInView(p, h)) + return; + } d->showCaret(); @@ -611,6 +615,11 @@ void GuiWorkArea::Private::resizeBufferView() void GuiWorkArea::Private::updateCaretGeometry() { + // 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()) + return; + Point point; int h = 0; buffer_view_->caretPosAndHeight(point, h);