]> git.lyx.org Git - lyx.git/commitdiff
Remove useless SinglePar update when scrolling in text
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 3 Jul 2024 15:31:38 +0000 (17:31 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 10 Jul 2024 15:18:48 +0000 (17:18 +0200)
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

index 687144ce506cfb77f8cd258bea7ba2335dca9604..d314c251ae467eb0923dfab3bc79ae19284802e7 100644 (file)
@@ -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;
                }