commit 00ec2dd10648ba3220ce97c7502897520bb85ac6
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Jun 8 10:32:47 2018 +0200

    Unbreak completion in text mode
    
    Completion uses a complicated async scheme based on timers to update
    itself. This is probably not necessary anymore and is fragile to
    event order changes.
    
    This is what happens with the new painting scheme. Therefore the
    asyncHideXXX() methods have to be made more robust and detect whether
    completion state has changed by the time they are triggered.
    
    (cherry picked from commit f1ea7fee5cda3fbbeb9fdbb8bec2bd91c0745e56)
---
 src/frontends/qt4/GuiCompleter.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt4/GuiCompleter.cpp 
b/src/frontends/qt4/GuiCompleter.cpp
index 9858b8d..f2e4eda 100644
--- a/src/frontends/qt4/GuiCompleter.cpp
+++ b/src/frontends/qt4/GuiCompleter.cpp
@@ -538,7 +538,9 @@ void GuiCompleter::showPopup(Cursor const & cur)
 void GuiCompleter::asyncHidePopup()
 {
        popup()->hide();
-       if (!inlineVisible())
+       // do not clear model if it has been set by an event before the
+       // timeout got triggered.
+       if (!modelActive_ && !inlineVisible())
                model_->setList(0);
 }
 
@@ -573,7 +575,9 @@ void GuiCompleter::hideInline(Cursor const & cur)
 
 void GuiCompleter::asyncHideInline()
 {
-       if (!popupVisible())
+       // do not clear model if it has been set by an event before the
+       // timeout got triggered.
+       if (!modelActive_ && !popupVisible())
                model_->setList(0);
 }
 

Reply via email to