ObliviousHarmony / vscode-php-codesniffer

A VS Code extension for integrating PHP_CodeSniffer.
https://marketplace.visualstudio.com/items?itemName=obliviousharmony.vscode-php-codesniffer
Other
38 stars 2 forks source link

Format Selection No Longer Limited To First Character #50

Closed ObliviousHarmony closed 2 years ago

ObliviousHarmony commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

This pull request expands the token position map to include every character that is part of a token. Prior to this, "Format Selection" requests would only work on a problem if the first character of that problem was selected. Now, every selected character is considered.

Closes #46.

How to test the changes in this Pull Request:

  1. Open a file with problems.
  2. Select some text other than the first character that the problem is associated with.
  3. With this pull request, "Format Selection" will work as you expect it to. Without this pull request, it will do nothing.