vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Portion of file where deleted lines show as red

Open anuj98 opened this issue 3 years ago • 2 comments

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 (784b0177c56c607789f9638da7b6bf3230d47a8c, 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

anuj98 avatar Sep 21 '22 09:09 anuj98

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!

vscodenpa avatar Sep 21 '22 09:09 vscodenpa

This is the latest updated version still seeing the same issue

anuj98 avatar Sep 21 '22 09:09 anuj98

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

anuj98 avatar Sep 22 '22 15:09 anuj98

Any thoughts on this @daviddossett, @alexdima?

lszomoru avatar Sep 23 '22 05:09 lszomoru

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?

daviddossett avatar Sep 26 '22 16:09 daviddossett

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.

lszomoru avatar Sep 29 '22 13:09 lszomoru

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

alexdima avatar Sep 30 '22 07:09 alexdima

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?

https://github.com/microsoft/vscode/blob/3747d2224ccfc88e76df3436c511f9bfffc77a7d/src/vs/platform/theme/common/colorRegistry.ts#L289

daviddossett avatar Oct 18 '22 17:10 daviddossett

@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

alexdima avatar Oct 23 '22 16:10 alexdima

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

daviddossett avatar Oct 27 '22 16:10 daviddossett

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

lszomoru avatar Dec 05 '22 12:12 lszomoru

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

daviddossett avatar Dec 05 '22 17:12 daviddossett