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

Disabled line numbers reappear after toggling Zen mode #78545

Closed
abbioro opened this issue Aug 6, 2019 · 14 comments · Fixed by microsoft/azuredatastudio#7206
Closed

Disabled line numbers reappear after toggling Zen mode #78545

abbioro opened this issue Aug 6, 2019 · 14 comments · Fixed by microsoft/azuredatastudio#7206
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-zen Full screen 'Zen' view issues

Comments

@abbioro
Copy link

abbioro commented Aug 6, 2019

  • VSCode Version: 1.36.1
  • OS Version: Windows_NT x64 6.1.7601

Steps to Reproduce:

  1. Add the following to user config to disable line numbers in markdown files
"[markdown]": {
    "editor.lineNumbers": "off"
},
  1. Open a markdown file, note that line numbers are disabled as expected
  2. Activate Zen mode
  3. Deactivate Zen mode
  4. Line numbers reappear despite being disabled for markdown files in config

Note that this only happens if you disable line numbers for a specific mode. If line numbers are disabled globally everything works as expected and they never reappear.

Does this issue occur when all extensions are disabled?: Yes

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug workbench-zen Full screen 'Zen' view issues labels Aug 7, 2019
@isidorn isidorn added this to the August 2019 milestone Aug 7, 2019
@isidorn
Copy link
Contributor

isidorn commented Aug 7, 2019

Thanks for reporting this. The next vscode insiders will have the fix so you can try it out there.

@isidorn isidorn closed this as completed in 9e65deb Aug 7, 2019
@crystalfp
Copy link

The problem persists in 1.37.1

@isidorn
Copy link
Contributor

isidorn commented Aug 19, 2019

@crystalfp this will only be fixed in the next release, not in 1.37.1
But in 1.38.
It is available currently in vscode insiders so you can use that in the meantime. Thanks

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 28, 2019

I was still able to repo this in 8cd00a7 by adding the setting as a workspace setting

@mjbvz mjbvz reopened this Aug 28, 2019
@mjbvz mjbvz added the verification-found Issue verification failed label Aug 28, 2019
@isidorn
Copy link
Contributor

isidorn commented Aug 28, 2019

@mjbvz I can not reproduce this with a fresh user data dir on latest insiders.
Please let me know what you are doing differently than me and I will reopen.

wrap

@isidorn isidorn closed this as completed Aug 28, 2019
@jrieken jrieken reopened this Aug 29, 2019
@jrieken
Copy link
Member

jrieken commented Aug 29, 2019

Yeah, reproduces with @mjbvz's steps. @isidorn You aren't following the steps from the OP, e.g the setting must be specific to markdown (and a workspace setting)

@isidorn
Copy link
Contributor

isidorn commented Aug 29, 2019

@jrieken @mattbierner thanks for catching this. Pushing to next milestone.
@sandy081 how can I get the true value of the configuration setting. Currently I am using

this.configurationService.getValue('editor.lineNumbers', { resource: model.uri });

I thought this code snippet will also take care of workspace setting and respect markdown.

@isidorn isidorn modified the milestones: August 2019, September 2019 Aug 29, 2019
@crystalfp
Copy link

The workspace setting seems irrelevant. I have the setting specific to markdown (this is critical) at the user level and the problem is there.

@isidorn
Copy link
Contributor

isidorn commented Aug 29, 2019

@crystalfp please read my comment from above #78545 (comment)
We are all using vscode insiders

@crystalfp
Copy link

crystalfp commented Aug 29, 2019

Sorry. I tried only to be helpful...

@isidorn
Copy link
Contributor

isidorn commented Aug 29, 2019

No problemo.

@jeanp413
Copy link
Contributor

jeanp413 commented Sep 2, 2019

how can I get the true value of the configuration setting. Currently I am using

this.configurationService.getValue('editor.lineNumbers', { resource: model.uri });

I thought this code snippet will also take care of workspace setting and respect markdown.

The overrideIdentifier property is also needed

this.configurationService.getValue('editor.lineNumbers', { overrideIdentifier: model.getModeId(), resource: model.uri });

@sandy081
Copy link
Member

sandy081 commented Sep 2, 2019

@jeanp413 Thanks for pitching in. You are correct overrideIdentifier is needed to get language overridden settings.

Instead you can use the following service which takes care of overrideIdentifier and resource for you.

https://github.com/microsoft/vscode/blob/cd46e5b/src/vs/editor/common/services/resourceConfiguration.ts#L32

@isidorn isidorn closed this as completed in e4b2df1 Sep 2, 2019
@isidorn
Copy link
Contributor

isidorn commented Sep 2, 2019

@jeanp413 @sandy081 thanks. I decided to go with the overrideIdentifier since I did not want to introduce a new service dependency on that layer.

@roblourens roblourens added verified Verification succeeded and removed verification-found Issue verification failed labels Oct 3, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded workbench-zen Full screen 'Zen' view issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants