Jasonlhy / VSCode-Hungry-Delete

To delete an entire block of whitespace or tab, and reduce the time programmers need to press backspace
https://marketplace.visualstudio.com/items?itemName=jasonlhy.hungry-delete
MIT License
45 stars 4 forks source link

fix delete multi-string can not find the cursor #4

Closed tiansin closed 6 years ago

Jasonlhy commented 6 years ago

Thanks for the pull request.

Implementation Comparison After doing some investigations, I found that the pull request feature is a little bit different from the current implementation of vscode.

Your implementation are:

  1. When user press the backspace button or control-backspace
  2. Adjust the editor's view point to reveal the first cursor selection regardless of the numbers of selection.

Current implementation of vscode are:

  1. When user press the backspace button
  2. If there is only one selection, adjust the editor's view point to reveal the only one cursor selection with default reveal type. Otherwise, not to reveal the selections, the editor's view point stays still.

Suggestion In order to keep consistency with default vscode implementation and mainstream editor implementation It may be better to add a preference to let people choose whether they would like to reveal the cursor if there are multiple selections.

tiansin commented 6 years ago

Thanks for the information that you provided, now adds a logic that maintains the same functionality as the editor

Jasonlhy commented 6 years ago

Thanks for the contribution and happy new year:)