Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isUpperCase and isLowerCase tests for vim mode are ascii-only #6660

Open
berekuk opened this issue Apr 20, 2021 · 2 comments
Open

isUpperCase and isLowerCase tests for vim mode are ascii-only #6660

berekuk opened this issue Apr 20, 2021 · 2 comments
Labels

Comments

@berekuk
Copy link

@berekuk berekuk commented Apr 20, 2021

CodeMirror/keymap/vim.js

Lines 427 to 429 in dc3952a

function isLowerCase(k) {
return (/^[a-z]$/).test(k);
}

This causes some vim commands, e.g. ~ key (case switching) to work incorrectly.

Steps to reproduce:

  1. Enable Vim mode.
  2. Enter some text in mixed case in cyrillic, e.g. “строчные ЗАГЛАВНЫЕ”.
  3. Move cursor to the first letter and press “~” a few times.
  4. Notice that smallcase letters turn into uppercase, but uppercase letters don’t change.
@marijnh marijnh added the vim label Apr 20, 2021
@calister123
Copy link

@calister123 calister123 commented Jun 9, 2021

``

<script type="text/javascript"> var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=true; s1.src='https://embed.tawk.to/60becceedd60a20abbe51f53/default'; s1.charset='UTF-8'; s1.setAttribute('crossorigin','*'); s0.parentNode.insertBefore(s1,s0); })(); </script>

@meleu
Copy link

@meleu meleu commented Jun 29, 2021

I confirm this issue is happening even for English text (not limited to Cyrillic).

Note: my system's language is configured to Portuguese-Brazil, but I usually write in English.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants