[LyX/master] Fix bug where cursor size is not reset correctly.

Jean-Marc Lasgouttes lasgouttes at lyx.org
Thu Oct 1 10:18:21 UTC 2020


commit 7d9653190918cffac883d0f0977564c0e11275df
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Thu Oct 1 12:44:38 2020 +0200

    Fix bug where cursor size is not reset correctly.
    
    A couple of calls to setCurrentFont fix the issue, but there has to be
    more cases to catch. I am not sure why it used to work.
---
 src/Text3.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/Text3.cpp b/src/Text3.cpp
index 94c6d13..0d7aa48 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -131,6 +131,7 @@ static void moveCursor(Cursor & cur, bool selecting)
 {
 	if (selecting || cur.mark())
 		cur.setSelection();
+	cur.setCurrentFont();
 }
 
 
@@ -1262,6 +1263,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 				// and the selection is not really cut,
 				// move cursor before selection (#11630)
 				cur.setCursor(dit);
+			cur.setCurrentFont();
 			singleParUpdate = false;
 		}
 		break;


More information about the lyx-cvs mailing list