commit 1e2b503ac934e06cdd253b1d3d80c5ae7122c35b
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Wed Jan 2 18:36:02 2019 +0100

    Remove premature (and bad) optimization
    
    When blinking the caret, it looks like a cool idea to only update the
    small rectangle containing the caret. Actually it is an awful idea, since
    the paint event will paint some rows, and these rows will not be
    properly painted outside of the small rectangle. Unfortunately, the
    painter will skip those "painted" rows on next paint events.
    
    This leads to painting errors that depend on the ordering of "real"
    and "caret" paint events. This is the reason why they only appeared
    with split screens.
    
    Quote of the day: ``The real problem is that programmers have spent far
    too much time worrying about efficiency in the wrong places and at the
    wrong times; premature optimization is the root of all evil (or at
    least most of it) in programming.''
    -- Donald Knuth, The Art of Computer Programming.
    
    Fixes bug #11354.
    
    (cherry picked from commit fba9f5b9e884f0a988bd77992772eb4986eecdec)
---
 src/frontends/qt4/GuiWorkArea.cpp |    4 ++--
 status.23x                        |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp 
b/src/frontends/qt4/GuiWorkArea.cpp
index 18c25ca..fee3c33 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -636,7 +636,7 @@ void GuiWorkArea::Private::showCaret()
                return;
 
        updateCaretGeometry();
-       p->viewport()->update(caret_->rect());
+       p->viewport()->update();
 }
 
 
@@ -647,7 +647,7 @@ void GuiWorkArea::Private::hideCaret()
 
        caret_visible_ = false;
        //if (!qApp->focusWidget())
-               p->viewport()->update(caret_->rect());
+               p->viewport()->update();
 }
 
 
diff --git a/status.23x b/status.23x
index e2f47e3..1ee2757 100644
--- a/status.23x
+++ b/status.23x
@@ -110,6 +110,8 @@ What's new
 
 - Completion popup context menu now properly responds to Esc key.
 
+- Fix document updating issues with split view (bug 11354).
+
 
 * INTERNALS
 

Reply via email to