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

Portion of file where deleted lines show as red #161386

Closed
anuj98 opened this issue Sep 21, 2022 · 12 comments
Closed

Portion of file where deleted lines show as red #161386

anuj98 opened this issue Sep 21, 2022 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@anuj98
Copy link

anuj98 commented Sep 21, 2022

Type: Bug

In normal file and not in git compare, whenever a line is deleted it shows as red color in the right section. It causes confusion as the this color matches with the color whenver there is an error in code.

image

VS Code version: Code 1.71.0 (784b017, 2022-09-01T07:36:10.600Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Sandboxed: No

System Info
Item Value
Screen Reader no
VM 0%
Extensions (13)
Extension Author (truncated) Version
atlascode atl 2.10.12
emoji-snippets dev 1.5.3
es7-react-js-snippets dsz 4.4.3
gitlens eam 12.2.2
prettier-vscode esb 9.8.0
auto-close-tag for 0.5.14
auto-rename-tag for 0.1.10
vscode-azureappservice ms- 0.24.3
vscode-azureresourcegroups ms- 0.5.6
azure-account ms- 0.11.1
cpptools ms- 1.12.4
vscode-yaml red 1.10.1
html5-boilerplate sid 1.1.1
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@anuj98
Copy link
Author

anuj98 commented Sep 21, 2022

This is the latest updated version still seeing the same issue

@anuj98
Copy link
Author

anuj98 commented Sep 22, 2022

Which colour are we thinking of here? And what might be the expected ETA?

@lszomoru
Copy link
Member

Any thoughts on this @daviddossett, @alexdima?

@daviddossett
Copy link
Contributor

I think it makes sense to use the same color we use for diffs—green for inserted, red for deleted. Not to discount the issue, but I think that benefit outweighs the overlap with errors IMO. It would be strange to use a different color in the editor.

We could possible use a pattern or shape (like a mini version of the line deleted arrow) in the minimap to distinguish it from errors. @lszomoru is it even possible do customize anything beyond the color in the minimap?

@lszomoru
Copy link
Member

We could possible use a pattern or shape (like a mini version of the line deleted arrow) in the minimap to distinguish it from errors. @lszomoru is it even possible do customize anything beyond the color in the minimap?

I would have to defer to @alexdima on that.

@alexdima
Copy link
Member

Currently only the color can be changed in the minimap gutter decoration rendering

@daviddossett
Copy link
Contributor

daviddossett commented Oct 18, 2022

I looked into this and it appears that we represent deleted lines in the gutter and errors inline with the line/word(s) highlighted.

CleanShot 2022-10-18 at 10 12 06@2x

I believe this is the right thing to do since it essentially matches what we do in the editor.

CleanShot 2022-10-18 at 10 11 52@2x

Changing the color to be different in the minimap will likely cause more confusion. What did you have in mind, @anuj98?

@alexdima I was going to suggest to override the colors in settings.json but I can't seem to get this to work. Similarly, I can't override the base color editor.errorForeground.

"workbench.colorCustomizations": {
  "editor.minimapGutter.deletedBackground": "#FF53CF",
}

Any ideas why this only works when changing the inherited color value here?

export const editorErrorForeground = registerColor('editorError.foreground', { dark: '#F14C4C', light: '#E51400', hcDark: '#F48771', hcLight: '#B5200D' }, nls.localize('editorError.foreground', 'Foreground color of error squigglies in the editor.'));

@alexdima
Copy link
Member

@daviddossett The following worked for me:

"workbench.colorCustomizations": {
	"editorGutter.deletedBackground": "#0000fb",
	"minimapGutter.deletedBackground": "#0000fb",
	"editorError.foreground": "#00ff11",
	"minimap.errorHighlight": "#00ff11",
	"editorOverviewRuler.errorForeground": "#00ff11"
}

Screenshot 2022-10-23 at 18 40 04

@daviddossett
Copy link
Contributor

Ah ok I think my mistake was using "editor.minimapGutter.deletedBackground" instead of "minimapGutter.deletedBackground". Seems to work for me now.

@lszomoru
Copy link
Member

lszomoru commented Dec 5, 2022

@daviddossett, what is the status of this issue? Thank you!

@lszomoru lszomoru added the bug Issue identified by VS Code Team member as probable bug label Dec 5, 2022
@daviddossett
Copy link
Contributor

I'd suggest we close this issue given the findings above.

@lszomoru lszomoru closed this as completed Dec 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2023
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
Projects
None yet
Development

No branches or pull requests

6 participants