[LyX/master] Fixup 2bdd691130: remove two more Update::SinglePar instances

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sat Jul 20 15:13:56 UTC 2024


commit 485f5afc21ba553fd16465231de7570b0c631298
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Sat Jul 20 17:12:09 2024 +0200

    Fixup 2bdd691130: remove two more Update::SinglePar instances
    
    They do not do what the author(s) of these lines thought it would do,
    and can create crashes.
---
 src/Text.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index d56cd10268..c61bb8f812 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -5267,7 +5267,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 				// Set the cursor
 				bvcur.resetAnchor();
 			if (!bv->mouseSetCursor(cur, cmd.modifier() == ShiftModifier))
-				cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
+				cur.screenUpdateFlags(Update::FitCursor);
 			// FIXME: move this to mouseSetCursor?
 			if (bvcur.wordSelection() && bvcur.inTexted())
 				expandWordSel(bvcur);
@@ -5366,9 +5366,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 				// selectWord but bvcur is current
 				// mouse position.
 				cur.bv().cursor().setSelection();
-				// We might have removed an empty but drawn selection
-				// (probably a margin)
-				cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
+				cur.screenUpdateFlags(Update::FitCursor);
 			} else
 				cur.noScreenUpdate();
 			// FIXME: We could try to handle drag and drop of selection here.


More information about the lyx-cvs mailing list