[LyX/2.3.x] Avoid blinking change tracking cur for math inset.

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sun Jan 26 22:00:28 UTC 2020


commit b7c098c3fafba45e0af98cfa11aeee89c367b235
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Sat Jan 11 13:39:20 2020 +0100

    Avoid blinking change tracking cur for math inset.
    
    Since there is a margin above and below the inset, there is no problem
    for putting it higher.
    
    Fixes bug #11684.
    
    (cherry picked from commit bf7f4d716cf0ef148495d7ecd616a1aaea57a13d)
---
 src/mathed/InsetMathHull.cpp |    9 ++++++---
 status.23x                   |    2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index d6d804d..f22b647 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -692,9 +692,12 @@ void InsetMathHull::draw(PainterInfo & pi, int x, int y) const
 	}
 
 	// drawing change line
-	if (canPaintChange(*bv))
-		pi.change_.paintCue(pi, x + 1, y + 1 - dim.asc,
-		                    x + dim.wid, y + dim.des);
+	if (canPaintChange(*bv)) {
+		// like in metrics()
+		int const display_margin = display() ? displayMargin() : 0;
+		pi.change_.paintCue(pi, x + 1, y + 1 - dim.asc + display_margin,
+		                    x + dim.wid, y + dim.des - display_margin);
+	}
 }
 
 
diff --git a/status.23x b/status.23x
index e04e926..354c555 100644
--- a/status.23x
+++ b/status.23x
@@ -44,6 +44,8 @@ What's new
 
 * USER INTERFACE
 
+- Fix display glith where the change tracking cue blinks with the cursor
+  (bug 11684).
 
 * INTERNALS
 


More information about the lyx-cvs mailing list