commit bc0727f024adb78ddbc580528ee136111d428205
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Feb 15 14:31:33 2026 +0100
Fix AutoInsert for style arguments with selection
---
src/Text.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/Text.cpp b/src/Text.cpp
index f8f976e8b6..c2db23aafe 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -5052,6 +5052,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
for (auto const & la_pair : tclass[layout].args()) {
Layout::latexarg const & arg = la_pair.second;
if (arg.autoinsert) {
+ // For the first autoarg, if there is
+ // a selection and InsertCotext is false,
+ // clear selection (#12364)
+ if (!inautoarg && !arg.insertcotext)
+ cur.clearSelection();
// If we had already inserted an arg
automatically,
// leave this now in order to insert the next
one.
if (inautoarg) {
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs