]> 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, 3 Jul 2024 15:31:38 +0000 (17:31 +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.

src/Text.cpp

index 6ffd5f894dc71fb805e3c3162b7d0aa3fc83aace..2a5ff9f0b82655da8e5c352377eadaa8da2ebaad 100644 (file)
@@ -5344,7 +5344,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;
                }