]> git.lyx.org Git - lyx.git/commitdiff
Fixup f4364c75: remove two more Update::SinglePar instances
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 20 Jul 2024 15:12:09 +0000 (17:12 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 20 Jul 2024 21:50:48 +0000 (23:50 +0200)
They do not do what the author(s) of these lines thought it would do,
and can create crashes.

(cherry picked from commit 485f5afc21ba553fd16465231de7570b0c631298)

src/Text.cpp
status.24x

index 767117a33af62f89c7c45d3027622c7b55fae0ad..1e55600a802c0167504931b6b3c578bf0306d9b3 100644 (file)
@@ -5266,7 +5266,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);
@@ -5365,9 +5365,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.
index b30028e77569495cf376e039e32f483415b08c95..2be245c92de2bf05f225f164c87b0952e228d490 100644 (file)
@@ -55,6 +55,8 @@ What's new
 
 - Fix crash when attempting to search in selection that contains only math.
 
+- Fix potential crashes when scrolling documents.
+
 - Fix bug where the dialog asking for saving unapplied changes on buffer change
   popped up twice, or sometimes not at all (bug 12954).