mugiwara85/CodeblockCustomizer

[BUG] Highlight active line highlights all lines, not only ones inside code blocks

Closed this issue · 7 comments

Note: I wrote this entire thing and then my browser crashed so I'm rewriting it a bit snipper and less proper.

First off, wanted to say I love the plugin and that it works great.

Okay so, issue is: Active line is highlighted no matter whether we're inside a code block or not.

With highlight active line enabled Here's it being shown on a random file. (bottom line is highlighted)

image

Here it can be seen working correctly while inside of a code block.

image

With highlight active line disabled

image

image

Of note, you can also tell in the last image that the line is still being slightly highlighted even with the setting disabled. (This does not occur with the plugin disabled)

Also, if you need my config or anything just let me know how I can send it over and I will.

@EastArctica Hi, there two options for highlighting the active line:

This one would only highlight the active line inside code blocks.
image

However if this is enabled, then it highlights the active line inside and outside of code blocks.
image

Can you check please? If I disable both of them, then I have no active line highlight.

I can confirm setting Enable editor active line highlight to disabled does fix all the issues.

I still wonder if the slight background inside the code block when we have Enable editor active line highlight enabled and Enable codeblock active line highlight disabled should occur? This would be up to you though I don't mind either way 🤷

No, it should not. I checked again, and if both are disabled, there is no highlight for the active line. What Obsidian Theme are you using? This may be coming from your theme. Try to switch themes, or disable custom CSS (if you have applied any), to check if you can still see it then.

No, it should not. I checked again, and if both are disabled, there is no highlight for the active line. What Obsidian Theme are you using? This may be coming from your theme. Try to switch themes, or disable custom CSS (if you have applied any), to check if you can still see it then.

Sorry, I must've worded it badly in my message.

Is it intended for the active line inside of a code block to be highlighted under these conditions:
Enable editor active line highlight: Enabled
Enable codeblock active line highlight: Disabled

The highlight I'm referring to is very transparent and barely appears, but appears nonetheless.

In that case yes. Editor active line highlight applies the active line highlight for the whole editor (inside and outside) of code blocks. Codeblock active line highlight applies the active line highlight to only code blocks. If you enable both of them, then you can have different highlight colors when you click inside or outside of a code block.

If you disable both of them, do you still have active line highlight?

If you disable both of them, do you still have active line highlight?

Yes. With both disabled, I get no active highlights.

Thank you for your help. I wanted to make sure that the editor active line highlight triggering inside the code block was intended and not a bug.

No problem.