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

Invalid toggle when caret is after the last or the second-last characters of the selection #1

Open
3 tasks
wscourge opened this issue Jul 5, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@wscourge
Copy link
Owner

wscourge commented Jul 5, 2020

As listed in the known issues, the current behavior is not ideal.

second-last-bug

The | represents the current caret position.

There are two problems:

  1. Does not work at all when the caret is placed at the end of a string, ie.: "camelCase|"
  2. Does not work when the caret is placed after the second-last string's character, ie.: "camelCa|se" (visible on gif)

It happens due to the string length change - it varies between camelCase and snake_case / kebab-case. Caret's position should update in some smart way.

Acceptance criteria:

  • Toggling works as expected when the caret is placed at the end of the to-be-toggled string: ie.: camelCase|.
  • Toggling works as expected when the caret is placed after the second-last character of the to-be-toggled-string, ie.: camelCas|e.
  • The known issues section of the README.md is removed.

I'm open to any suggestions.

@wscourge wscourge added the bug Something isn't working label Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant