From 6fbc8c6352a965231a35ee8b052e3a6b80b5ce57 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 3 May 2023 12:55:44 +0200 Subject: [PATCH] Fixup 7f1b1729: restore lazy caret handling For some reason, the code that should have been put in updateCaretGeometry() went to resetCaret(). I do not see how that made sense. I am not totally sure what the consequences of the patch are, though. It just "looks right". --- src/frontends/qt/GuiWorkArea.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp index d634f83894..f6e3c723df 100644 --- a/src/frontends/qt/GuiWorkArea.cpp +++ b/src/frontends/qt/GuiWorkArea.cpp @@ -479,15 +479,6 @@ void GuiWorkArea::Private::resetCaret() if (!buffer_view_->caretInView() || !p->hasFocus()) return; - // completion indicator - Cursor const & cur = buffer_view_->cursor(); - bool const completable = cur.inset().showCompletionCursor() - && completer_->completionAvailable() - && !completer_->popupVisible() - && !completer_->inlineVisible(); - - buffer_view_->buildCaretGeometry(completable); - needs_caret_geometry_update_ = true; caret_visible_ = true; } @@ -500,6 +491,14 @@ void GuiWorkArea::Private::updateCaretGeometry() if (buffer_view_->busy() || !buffer_view_->caretInView()) return; + // completion indicator + Cursor const & cur = buffer_view_->cursor(); + bool const completable = cur.inset().showCompletionCursor() + && completer_->completionAvailable() + && !completer_->popupVisible() + && !completer_->inlineVisible(); + + buffer_view_->buildCaretGeometry(completable); needs_caret_geometry_update_ = false; } -- 2.39.5