[moved discussion to lyx-devel]
Le 13/10/2024 à 21:56, Jean-Marc Lasgouttes a écrit :
Le 13/10/2024 à 20:38, Richard Kimberly Heck a écrit :
On 10/12/24 7:37 PM, Jean-Marc Lasgouttes wrote:
I would say that this is a bug that we should fix
In the sense of changing the shortcut or changing the behavior described?
In the sense that the shortcut is only necessary because capitalization
of "aaAaa" is currently "AaAaa" instead of "Aaaaa".
The patch is trivial.
Here is what I have in mind. It changes the behavior, but I think it is OK.
JMarc
From e8257c7dd3f40d50f317dc91fd9191454383fc36 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Sun, 13 Oct 2024 22:09:32 +0200
Subject: [PATCH] Fix word-capitalize
The new implementation changes the letters other than the first to
lowercase, as should be.
Old code: aaaAaa => AaaAaa
New code: aaaAaa => Aaaaaa
---
src/Paragraph.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 72fdd85dde..408ef117b7 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -4793,10 +4793,8 @@ void Paragraph::changeCase(BufferParams const & bparams, pos_type pos,
newChar = lowercase(oldChar);
break;
case text_capitalization:
- if (capitalize) {
- newChar = uppercase(oldChar);
- capitalize = false;
- }
+ newChar = capitalize ? uppercase(oldChar) : lowercase(oldChar);
+ capitalize = false;
break;
case text_uppercase:
newChar = uppercase(oldChar);
--
2.43.0
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel