[LyX/master] Amend bc0727f024a

Juergen Spitzmueller spitz at lyx.org
Sun Feb 15 14:44:58 UTC 2026


commit cdaf65bce8ace5fb180ba58751fc96f4be699e97
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Feb 15 15:44:25 2026 +0100

    Amend bc0727f024a
    
    This does probably feel a bit more natural
---
 src/Text.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index c2db23aafe..142dd6f785 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -5055,8 +5055,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 				// For the first autoarg, if there is
 				// a selection and InsertCotext is false,
 				// clear selection (#12364)
-				if (!inautoarg && !arg.insertcotext)
+				if (!inautoarg && !arg.insertcotext && cur.selection()) {
+					DocIterator dit = cur.selectionBegin();
 					cur.clearSelection();
+					cur.setCursor(dit);
+				}
 				// If we had already inserted an arg automatically,
 				// leave this now in order to insert the next one.
 				if (inautoarg) {


More information about the lyx-cvs mailing list