mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Do not compute caret geometry when we are not ready to do so.
This avoid crashes with invalid cache. Fixes bug #11763.
This commit is contained in:
parent
ed137ee435
commit
5202d44ef5
@ -443,8 +443,10 @@ void GuiWorkArea::startBlinkingCaret()
|
||||
if (view().busy())
|
||||
return;
|
||||
|
||||
// Don't start blinking if the cursor isn't on screen.
|
||||
if (!d->buffer_view_->caretInView())
|
||||
// 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())
|
||||
return;
|
||||
|
||||
d->showCaret();
|
||||
@ -608,7 +610,10 @@ void GuiWorkArea::Private::resizeBufferView()
|
||||
|
||||
void GuiWorkArea::Private::updateCaretGeometry()
|
||||
{
|
||||
if (!buffer_view_->caretInView())
|
||||
// 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())
|
||||
return;
|
||||
|
||||
Point point;
|
||||
|
Loading…
Reference in New Issue
Block a user