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

Unexpected behavior when no text is selected with JSON options #38

Closed
3 tasks
Ste1io opened this issue Jan 25, 2023 · 1 comment
Closed
3 tasks

Unexpected behavior when no text is selected with JSON options #38

Ste1io opened this issue Jan 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Ste1io
Copy link

Ste1io commented Jan 25, 2023

The behavior of the following JSON options produce unexpected results when executed without first making a selection.

  • Fix and Format Json
  • Minify Json
  • Stringify Json

I would expect the default behavior, when no selection is made, to execute the action on the entire file's contents. Actual behavior ignores the file's contents, inserting a blank root pair {} (in the case of Fix/Format and Minify) or string quotes "" (for Stringify) at the position of the cursor.

Confirmed with language mode set to Json (json), JSON with Comments (jsonc), and Plain (plaintext).

Code_kex3yNPjjx

@carlocardella carlocardella added the bug Something isn't working label Jan 25, 2023
@carlocardella carlocardella self-assigned this Jan 25, 2023
@carlocardella
Copy link
Owner

Fix in a901d35

fix json

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

2 participants