[LyX/2.4.x] Remove useless SinglePar update when scrolling in text

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Jul 10 15:59:31 UTC 2024


commit f4364c7593a66c63a7a2b588ff60c3350353d89c
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Jul 3 17:31:38 2024 +0200

    Remove useless SinglePar update when scrolling in text
    
    Using SinglePar does not majke sense here since the paragraph is not
    modified and it might even not have a position yet.
    
    This fixes a crash in BufferView::singleParUpdate, which is not
    prepared (yet) to such situations.
    
    (cherry picked from commit 2bdd691130e5507fc5cc2ca81e71eef189e90fc5)
---
 src/Text.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 687144ce50..d314c251ae 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -5343,7 +5343,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 		bvcur.setCurrentFont();
 		if (cur.top() == old) {
 			// We didn't move one iota, so no need to update the screen.
-			cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
+			cur.screenUpdateFlags(Update::FitCursor);
 			//cur.noScreenUpdate();
 			return;
 		}


More information about the lyx-cvs mailing list