commit 6fbc8c6352a965231a35ee8b052e3a6b80b5ce57
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Wed May 3 12:55:44 2023 +0200

    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 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index d634f83..f6e3c72 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;
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to