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

Ctrl/Option + Backspace deletes too much in JSON files #29

Open
alinnert opened this issue Nov 23, 2021 · 3 comments
Open

Ctrl/Option + Backspace deletes too much in JSON files #29

alinnert opened this issue Nov 23, 2021 · 3 comments

Comments

@alinnert
Copy link

alinnert commented Nov 23, 2021

When I want to delete a word in a JSON file using ctrl + backspace (Windows) or option + backspace (Mac) in a JSON file this extension instead deletes everything until including the next occurring ".

Example:

{
  "key": "this is some| value"
                      ^ cursor
}

After hitting ctrl/option + backspace I get this:

{
  "key": | value"
         ^ cursor
}

This is not what I expect to happen. Only the word some should be deleted in this case. I've noticed this behavior only in JSON files. And it disappears as soon as I disable this extension.

@Natedude
Copy link

Natedude commented May 8, 2022

I came here to post about this problem. I came across it when editing my VSCode settings JSON.
Very annoying!

Maybe try looking into the extension code at the findDeleteWorldLeftStartPosition() function...

If I figure out a hack, I will share and maybe do a pull request. LMK if you find a fix, please.

@Jasonlhy
Copy link
Owner

@alinnert
I can't reproduce your problem

I think the problem is something like this? Usually this is not a problem, but myself did find it quite annoying when editing the JSON file ....

Will be fixed in next release

{ "person"|: "value"" }

become
{ ": "value" }

@alinnert
Copy link
Author

alinnert commented Sep 2, 2022

@Jasonlhy it seems this issue really doesn't exist anymore. If you didn't fix it, I guess it was a bug in VS Code itself and it has been fixed on their side. 🤷‍♂️

In that case this issue can be closed. Unless you want it to stay open because you've mentioned another problem.

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

No branches or pull requests

3 participants