vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Bracket pair highlight border highlights different brackets to the bracket pair guides

Open bevis-hobbs opened this issue 3 years ago • 5 comments

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.74.0
  • OS Version: Windows 11

Steps to Reproduce:

  1. Place the cursor on the left of an opening bracket or on the right of a closing bracket.
  2. Notice how the bracket pair highlight border highlights different brackets to the bracket pair guides.

https://user-images.githubusercontent.com/101095063/206406932-70ce5b39-7b20-4f93-81ce-9b59c7375b74.mp4

bevis-hobbs avatar Dec 08 '22 09:12 bevis-hobbs

Afaik this used to be as you suggest, but it would be weird in (...) && (...), then (...)| && (...) would indicate that the first parenthensis group is active.

hediet avatar Dec 08 '22 13:12 hediet

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Dec 08 '22 14:12 vscodenpa

Afaik this used to be as you suggest, but it would be weird in (...) && (...), then (...)| && (...) would indicate that the first parenthensis group is active.

Not sure what you mean, could you explain further? You could add a setting so people who don't like it can turn it off.

bevis-hobbs avatar Dec 08 '22 14:12 bevis-hobbs

The active bracket pair guides indicate to which block you are currently adding text/instructions. When you have a block { console.log(1); }| and the cursor is at |, the block before the cursor is not active, as any text you type will be added outside the block.

hediet avatar Dec 08 '22 15:12 hediet

I should have said that when the cursor is on the left of an opening bracket or on the right of a closing bracket the bracket pair highlight border should highlight the brackets that the bracket pair guides draw a line between, which are the brackets surrounding the block of code the cursor is in.

This photoshopped screenshot shows what it should look like: image

This is what it currently looks like: image (1)

This currently happens when there are two closing brackets next to each other, it would make sense for it to always highlight brackets in this way: image

Sorry I wasn't clear.

bevis-hobbs avatar Dec 08 '22 17:12 bevis-hobbs

It used to be like that too, but we got a lot of feedback to change it. If you find the issue where this got discussed, please link it from here.

Feel free to create a new feature request about introducing a setting - probably we would accept a PR for that.

hediet avatar Dec 09 '22 10:12 hediet

The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.

Happy Coding!

vscodenpa avatar Dec 09 '22 10:12 vscodenpa