You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "uppercase last word" and "lowercase last word" commands have different rules for what they change. Using the former and then the latter on a word produces words where the first letter is lowered and everything else is uppered. That's probably not the intended behavior.
Reproducing
Map strokes to the two actions and compare what they do.
Map one stroke {*<} to and one to {*>}.
Write a word with several letters, preferably something with an uppercase letter somewhere else than in the start. For example, you could write iPod.
Expected results:
The word comes out, the first command puts it in all-caps (IPOD), the second one lowercases the whole word (ipod).
Actual results
The last stroke lowercases the first character, leaving the first one uppercased (iPOD).
Plover version and system
Running from source on Ubuntu.
What I've done to debug this
Since this had to do with built in commands, I decided to look at formatting.py and see if I could see what the commands were supposed to do. I checked the list of meta-to-action mappings and it seems the parameters passed to _apply_meta_retro_case have names that explain it: META_RETRO_UPPER uses CASE_UPPER_FIRST_WORD, but META_RETRO_LOWER uses CASE_LOWER_FIRST_CHAR. That could probably be changed to CASE_LOWER_FIRST_WORD, but some people might be used to the old behaviour, so maybe another solution is to create a new command that uses CASE_LOWER_FIRST_WORD. In any case, CASE_LOWER_FIRST_WORD would have to exist, in order to lowercase the entire word, and then you'd probably need a _lower_first_word function similar to the _upper_first word function. I could do this, but I think it should be easy enough for someone else. Or I could come back and look at it when I'm not as tired as I am now (it's half past 11 pm).
The text was updated successfully, but these errors were encountered:
Summary
The "uppercase last word" and "lowercase last word" commands have different rules for what they change. Using the former and then the latter on a word produces words where the first letter is lowered and everything else is uppered. That's probably not the intended behavior.
Reproducing
Map strokes to the two actions and compare what they do.
{*<}
to and one to{*>}
.iPod
.Expected results:
The word comes out, the first command puts it in all-caps (IPOD), the second one lowercases the whole word (ipod).
Actual results
The last stroke lowercases the first character, leaving the first one uppercased (iPOD).
Plover version and system
Running from source on Ubuntu.
What I've done to debug this
Since this had to do with built in commands, I decided to look at
formatting.py
and see if I could see what the commands were supposed to do. I checked the list of meta-to-action mappings and it seems the parameters passed to _apply_meta_retro_case have names that explain it: META_RETRO_UPPER uses CASE_UPPER_FIRST_WORD, but META_RETRO_LOWER uses CASE_LOWER_FIRST_CHAR. That could probably be changed to CASE_LOWER_FIRST_WORD, but some people might be used to the old behaviour, so maybe another solution is to create a new command that uses CASE_LOWER_FIRST_WORD. In any case, CASE_LOWER_FIRST_WORD would have to exist, in order to lowercase the entire word, and then you'd probably need a _lower_first_word function similar to the _upper_first word function. I could do this, but I think it should be easy enough for someone else. Or I could come back and look at it when I'm not as tired as I am now (it's half past 11 pm).The text was updated successfully, but these errors were encountered: