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

Line highlight fails inside merge conflict areas when background color set in theme #41201

Closed
jibsen opened this issue Jan 5, 2018 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug merge-conflict Merge conflict decorations and actions themes Color theme issues verified Verification succeeded
Milestone

Comments

@jibsen
Copy link

jibsen commented Jan 5, 2018

  • VSCode Version: Code 1.19.1 (0759f77, 2017-12-19T09:46:23.884Z)
  • OS Version: Windows_NT x64 10.0.16299

Highlighting of current line works fine inside inline merge conflict blocks, but if the color theme changes the background color of these areas, the line highlighting disappears.

Steps to Reproduce:

  1. Choose a theme with line highlighting, I used Solarized Dark
  2. Add a 'merge conflict' to the editor, for instance
<<<<<<<
check if
line highlighting
works here
=======
>>>>>>>
  1. Check that line highlighting works inside the merge conflict area

vscode_merge_before

  1. Set the background color for merge conflicts, for instance add to settings:
    "workbench.colorCustomizations": {
		"merge.currentHeaderBackground": "#207972",
		"merge.currentContentBackground": "#0D4A4E"
    },
  1. Now current line is no longer highlighted inside the merge conflict area

vscode_merge_after

@vscodebot vscodebot bot added the merge-conflict Merge conflict decorations and actions label Jan 5, 2018
@jibsen
Copy link
Author

jibsen commented Jan 5, 2018

Same appears to apply to diffEditor.insertedTextBackground and diffEditor.removedTextBackground, also it removes highlighting of specific changes within lines.

@chrmarti
Copy link
Contributor

chrmarti commented Jan 8, 2018

The merge decorations are on top of the current line decoration. You can use transparency to let the underlying decoration shine through:

	"workbench.colorCustomizations": {
		"merge.currentHeaderBackground": "#20797288",
		"merge.currentContentBackground": "#0D4A4E88"
	}

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jan 8, 2018
@jibsen
Copy link
Author

jibsen commented Jan 8, 2018

I see, thank you, that explains the issue. I also had to add transparency to editor.selectionHighlightBackground, because if it is solid you cannot see selections through it. I guess it too is applied over the other decorations.

Is there any documentation, or some way to tell which colors are supposed to be transparent when working on a theme?

It would be nice if the theme color reference mentioned it.

@chrmarti
Copy link
Contributor

chrmarti commented Jan 8, 2018

@aeschli for the suggestion to document the order in which decorations are applied.

@chrmarti chrmarti assigned aeschli and unassigned chrmarti Jan 8, 2018
@chrmarti chrmarti removed the info-needed Issue requires more information from poster label Jan 8, 2018
@aeschli
Copy link
Contributor

aeschli commented Jan 11, 2018

@chrmarti The description in the color definition should mention that the color needs to be transparent.

aeschli added a commit to microsoft/vscode-docs that referenced this issue Jan 11, 2018
@aeschli aeschli added this to the January 2018 milestone Jan 11, 2018
@aeschli aeschli added themes Color theme issues bug Issue identified by VS Code Team member as probable bug labels Jan 11, 2018
@jibsen
Copy link
Author

jibsen commented Jan 11, 2018

Thanks!

@chrmarti
Copy link
Contributor

Good call, thanks @aeschli!

@roblourens roblourens added the verified Verification succeeded label Feb 1, 2018
@bobbrow
Copy link
Member

bobbrow commented Feb 15, 2018

Can you add documentation about "diffEditor.insertedTextBorder" as well? I just hit this today.

@aeschli
Copy link
Contributor

aeschli commented Feb 15, 2018

@bobbrow "diffEditor.insertedTextBorder" is documented here: https://code.visualstudio.com/docs/getstarted/theme-color-reference#_diff-editor-colors
I don't think the border needs to be transparent, does it?

@bobbrow
Copy link
Member

bobbrow commented Feb 15, 2018

Bah, I copied the wrong value. I meant diffEditor.insertedTextBackground

@bobbrow
Copy link
Member

bobbrow commented Feb 15, 2018

@jibsen had made a similar comment above, but it looks like the documentation was not updated for this property or diffEditor.removedTextBackground

@aeschli
Copy link
Contributor

aeschli commented Feb 15, 2018

Thanks @bobbrow, I updated the descriptions.

@bobbrow
Copy link
Member

bobbrow commented Feb 15, 2018

Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 25, 2018
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 merge-conflict Merge conflict decorations and actions themes Color theme issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants