Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotted lines in left margins disappeared in version 0.2.0 #75

Open
plusvic opened this issue May 25, 2023 · 1 comment
Open

Dotted lines in left margins disappeared in version 0.2.0 #75

plusvic opened this issue May 25, 2023 · 1 comment

Comments

@plusvic
Copy link

plusvic commented May 25, 2023

Version 0.2.0 renders the left margin differently than version 0.1.5. See an example from application:

With version 0.1.5:

Error: error: global rule `test_2` depends on non-global rule `test_1`
    ╭─[test.yar:25:5]
    │
  8 │ rule test_1 {
    ·      ───┬──
    ·         ╰──── non-global rule `test_1` declared here
    ·
 23 │ global rule test_2 {
    ·             ───┬──
    ·                ╰──── global rule `test_2` declared here
    ·
 25 │     test_1
    ·     ───┬──
    ·        ╰──── `test_1` is used in the condition of `test_2`
────╯

With version 0.2.0:

error: global rule `test_2` depends on non-global rule `test_1`
    ╭─[test.yar:25:5]
    │
  8 │ rule test_1 {
    │      ───┬──
    │         ╰──── non-global rule `test_1` declared here
    │
 23 │ global rule test_2 {
    │             ───┬──
    │                ╰──── global rule `test_2` declared here
    │
 25 │     test_1
    │     ───┬──
    │        ╰──── `test_1` is used in the condition of `test_2`
────╯ 

Version 0.1.5 uses dotted lines as a visual indication of missing lines, while in version 0.2.0 the dotted lines disappeared and the result is an error report that is less clear than before.

I believe this an unintended change that was introduced here when draw.vbar_break was replaced with draw.vbar.

Or perhaps the intention was replacing the dotted lines with a solid line in a different color? If that's the case I would say that the dotted line (possibly on a different color too) is a better alternative, as it works in monochrome environments as well.

@zesterer
Copy link
Owner

This is a good point, I didn't consider monochrome environments. I think it would be a fairly trivial change to introduce a 'margin style' parameter that can be configured via Config. I'd be very happy to accept a PR for this. Alternatively, I can put it on my backlog to be done when I can find time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants