]> git.lyx.org Git - lyx.git/commitdiff
Fixup 2bdd691130: 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 15:13:40 +0000 (17:13 +0200)
They do not do what the author(s) of these lines thought it would do,
and can create crashes.

src/Text.cpp

index d56cd10268a6632a15c1552657d1ffc8757a7330..c61bb8f812f556cb9cce7867979bb6ef2cd69f7f 100644 (file)
@@ -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.