clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
6 stars 0 forks source link

Large spaces in the gutter icon section #115

Closed darkenmay closed 2 months ago

darkenmay commented 2 months ago

Hello,

The last release adds large spaces in the gutter icon section, even if displaying complexity is off. If the plugin is disabled that behavior disappears.

Screenshot 2024-05-10 at 02 00 03

IntelliJ IDEA 2024.1.1 (Ultimate Edition) Build #IU-241.15989.150, built on April 29, 2024 Plugin [2024.1.22]

clutcher commented 2 months ago

@darkenmay What OS are you using? And what other plugins are installed?

I use 2024.1.1 with plugin version 2024.1.22 on Linux and don't see that issue: 2024-05-11_12-30-48

darkenmay commented 2 months ago

@clutcher macOS Sonoma.

Screenshot 2024-05-11 at 16 32 22

darkenmay commented 2 months ago

@clutcher I found out that this bug appears only when using RegExp with the following pattern.

(?:\G(?!^),\s|use\s[\w:]+\:\:\{(?=\w+(?:,\s\w+)*\}\;))(\w+)

This is used to highlight anything in Rust imports like

use serde::{Deserialize, Serialize};

So, Deserialize and Serialize will be highlighted.

https://regex101.com/r/Y7sD8H/1

It looks like an issue with capturing repeated group, because some simple regex like use\s[\w:]+(\b[A-Z]\w+) with single group occurrence works as expected.

darkenmay commented 2 months ago

@clutcher I just downloaded and installed the BH version 2024.1.21 and the issue disappeared.

clutcher commented 2 months ago

@darkenmay Thanks for such deep investigation. It helped me to find the root cause. Will fix it in nearest release.

darkenmay commented 2 months ago

@clutcher thanks a lot.