What would the consequences be of the attached patch?

From what I understand, finishUndo() is meant for when there have been
som undos of type INSERT or DELETE recorded, but PARAGRAPH_MOVE_DOWN
itself does not record any INSERTs or DELETEs. What would happen if
the finishUndo() is removed?

Is the cur.finishUndo() here meant for the case where a user is typing
and then executes pargraph-move-down and then continues typing? But
shouldn't a cur.recordUndo() end a sequence of INSERT type undos anyway?

Scott
From 47d42b2c4808856022ee23198b0056abee803636 Mon Sep 17 00:00:00 2001
From: Scott Kostyshak <[email protected]>
Date: Sat, 1 Feb 2020 12:32:30 -0500
Subject: [PATCH] Remove a finishUndo() after a recordUndo()

---
 src/Text3.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/Text3.cpp b/src/Text3.cpp
index 8643411da1..f5444e7baa 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -673,7 +673,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 	case LFUN_PARAGRAPH_MOVE_DOWN: {
 		pit_type const pit = cur.pit();
 		cur.recordUndo(pit, pit + 1);
-		cur.finishUndo();
 		pars_.swap(pit, pit + 1);
 		needsUpdate = true;
 		cur.forceBufferUpdate();
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to