atom / bracket-matcher

Jump to brackets
MIT License
142 stars 98 forks source link

Only One Tag is Highlighting #329

Closed superjoefly closed 6 years ago

superjoefly commented 7 years ago

Prerequisites

Description

Only one tag is highlighting when I select a tag. This happens with brackets as well as HTML tags. Up until recently, both tags would highlight.

Steps to Reproduce

  1. Select a tag and view the highlighting of the opening and closing tags. Only one is highlighting.

Expected behavior:

Expected both the opening and closing tags to be highlighted.

Actual behavior:

Only one tag, the one NOT selected, highlights.

Reproduces how often:

100%

Versions

Atom : 1.21.2 Electron: 1.6.15 Chrome : 56.0.2924.87 Node : 7.4.0

Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial

Additional Information

Please, let me know if there is anything else I can provide to help with the issue.

rsese commented 6 years ago

Thanks for the report! Can you share some example code that reproduces this behavior? Wondering if it's the same issue as https://github.com/atom/bracket-matcher/issues/333.

superjoefly commented 6 years ago

@rsese

It's similar to #333 but not exactly the same...

If I place the cursor next to an opening tag, the closing tag will highlight. If I place the cursor next to the closing tag, the opening tag highlights. However, the opening and closing tags do not stay highlighted at the same time.

Note: this happens in all files containing html.

Here are some images. I hope they are helpful:

example

example2

rsese commented 6 years ago

I had a chance to test on 1.21.2 with Ubuntu 16.04 but couldn't reproduce. I also tried with the latest stable version (1.23.2) and couldn't reproduce either - can you install the latest version and let me know if you still see this behavior in safe mode?

superjoefly commented 6 years ago

Okay...did some testing and it had something to do with the styles defined in my styles.less.

This was the culprit:

  .cursor-line {
    background-color: black;
  }

Thanks so much for your help :-)

rsese commented 6 years ago

Ahhh great, glad you found the cause!

jibsen commented 6 years ago

I think it might be a bug that the current line background is drawn on top of the bracket underline. It means that in any theme with an opaque current line background, the bracket underline will not be visible on the current line.