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

Hidden line numbers with Sticky lightbulb #20

Open
aleksmark98 opened this issue Jan 23, 2023 · 6 comments
Open

Hidden line numbers with Sticky lightbulb #20

aleksmark98 opened this issue Jan 23, 2023 · 6 comments

Comments

@aleksmark98
Copy link

Whenever I open a file, line numbers are hidden. When I check view->line numbers are enabled, so I have to disable them and enable them for line numbers to finally show up.

This behavior appeared after the much appreciated sticky lightbulb update.

@justcla
Copy link
Owner

justcla commented Jan 23, 2023

Oh dear! My apologies. Thanks for bringing it to my attention. I'll try to fix it this week.

Repository owner deleted a comment from justo-mend Jan 23, 2023
@justcla
Copy link
Owner

justcla commented Jan 23, 2023

This behaviour does not happen on my machine.
Is there any way to reliably replicate it?

@aleksmark98
Copy link
Author

I'll try to replicate it on my home machine and get back to you later.
On my work machine, I have all margins and outlining disabled, left only with line numbers. I got hot settings to get rid of the lightbulb margin (I didn't find a way to disable it in native VS22). Since the update, when I open a file, it opens with no no margins at all, almost as if I had a persistent "hide editor margins" setting.
When I toggle the lightbulb margin, close the file and reopen it, the setting persists, but when I enable line numbers, close and reopen, they don't persist.

@justcla
Copy link
Owner

justcla commented Jan 23, 2023

When I toggle the lightbulb margin, close the file and reopen it, the setting persists, but when I enable line numbers, close and reopen, they don't persist.

OK - That helps. I'll play with that and see what I can surface.

@aleksmark98
Copy link
Author

aleksmark98 commented Jan 24, 2023

Tested on my home machine, identical issue.
After some fiddling it appears that line numbers show up upon reopening a file only if lightbulb or selection margin is toggled on. So as long as I have line nums and selection margin, the settings stick as expected.
Oddly enough, having indicator margin on doesn't have the same effect on line nums, as selection or lightbulb margins.
Hope that's sufficient to reproduce it.

@justcla
Copy link
Owner

justcla commented Jan 24, 2023

Thanks for the extra detail. That should help me reproduce it. 👍

The current implementation is to toggle the VS settings (internally), and expect VS to display things correctly.
LightBulb margin is the only one that I had to hack because it's not exposed as a property.
With the Sticky LightBulb Margin fix, I check the settings and update the margins during page-open. But I only do it for LightBulb - expecting VS to take care of the rest.
But given VS seems to have some strange internal logic, I will force all margins to be checked and reset.

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