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

Terminal selection is drawn above foreground #47523

Closed
AndreasBackx opened this issue Apr 9, 2018 · 11 comments · Fixed by #84440
Closed

Terminal selection is drawn above foreground #47523

AndreasBackx opened this issue Apr 9, 2018 · 11 comments · Fixed by #84440
Assignees
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Milestone

Comments

@AndreasBackx
Copy link
Contributor

AndreasBackx commented Apr 9, 2018

Issue Type: Bug

When selecting text in the terminal, the text is behind the selection background. If the value for the selection background is opaque, then the text is invisible. I'd expect it to be behind the text like it is in the editor's color configuration.

With an opaque color:
Screenshot

With a more transparant color:
Screenshot

VS Code version: Code 1.22.1 (950b8b0, 2018-04-06T00:24:49.616Z)
OS version: Linux x64 4.15.14-1-ARCH

System Info
Item Value
CPUs AMD Ryzen 7 1700 Eight-Core Processor (16 x 2575)
Load (avg) 1, 1, 1
Memory (System) 15.68GB (4.89GB free)
Process Argv /opt/visual-studio-code/code
Screen Reader no
VM 0%
Extensions (3)
Extension Author (truncated) Version
project-manager ale 0.25.0
python ms- 2018.3.1
sublime-keybindings ms- 3.0.3
@vscodebot vscodebot bot added the terminal General terminal issues that don't fall under another label label Apr 9, 2018
@tweakimp
Copy link

tweakimp commented Apr 9, 2018

Maybe it is supposed to be this way, just the tooltip that this color needs to be opaque is missing. Compare with editor.selectionHighlightBackground

@AndreasBackx
Copy link
Contributor Author

@tweakimp editor.selectionHighlightBackground places the foreground above the background as expected.

Screenshot

@Tyriar
Copy link
Member

Tyriar commented Apr 11, 2018

Upstream issue: xtermjs/xterm.js#720

You need to use a transparent selection color currently which is less than ideal.

@Tyriar Tyriar added help wanted Issues identified as good community contribution opportunities upstream Issue identified as 'upstream' component related (exists outside of VS Code) bug Issue identified by VS Code Team member as probable bug labels Apr 11, 2018
@Tyriar Tyriar added this to the Backlog milestone Apr 11, 2018
@GlenPerkins
Copy link

Yes, eventually this "background" really needs to be in the background, not painted on top of everything else. As it is, the best you can do with it is to use transparency to make it look as if you've put colored plastic tape over your selection, which dulls it and changes its foreground color.

@Tyriar Tyriar added feature-request Request for new features or functionality and removed help wanted Issues identified as good community contribution opportunities bug Issue identified by VS Code Team member as probable bug labels Sep 12, 2018
@Luxcium
Copy link

Luxcium commented May 11, 2019

is it possible to transition from selection: IColor; to selectionForeground?: IColor;and selectionBackground?: IColor;

export interface IColorSet {
  foreground: IColor;
  background: IColor;
  cursor: IColor;
  cursorAccent: IColor;
  selection: IColor; 
  selectionForeground?: IColor;
  selectionBackground?: IColor;
  ansi: IColor[];
}

I would be happy to work on that in xtermjs/xterm.js (issues/720) but need to know how it must be implemented...
maybe @Tyriar could tell me how it should be done so I can. work on it is it is possible (I don't want to mess anything that will prevent the end result to be merged) I have my idea (but I am not sure how to communicate it)

I was, in fact, trying to find a way to change the color of the selected text (and maybe the border) as stated in zeit/hyper -> Add a config option for selected text color setting (issues/2934)

@Tyriar
Copy link
Member

Tyriar commented May 11, 2019

@Luxcium we probably do want selection foreground eventually be customizable as well, that way the user can choose their preferred style as set fg/bg colors has some great accessibility benefits. But we probably shouldn't move on this issue until the canvas renderer is removed (and replaced with xtermjs/xterm.js#1790)

@tweakimp
Copy link

tweakimp commented Oct 4, 2019

@Tyriar any news on this issue? The one you linked is merged, but this issue is still a problem.

@Tyriar
Copy link
Member

Tyriar commented Oct 4, 2019

@tweakimp we're not using the webgl renderer yet

@Tyriar Tyriar changed the title "terminal.selectionBackground" is above foreground Terminal selection is drawn above foreground Oct 8, 2019
@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2019

This issue is blocked on the webgl renderer being stabilized, see the issue query: https://github.com/xtermjs/xterm.js/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Faddon%2Fwebgl

@Tyriar Tyriar added upstream-issue-linked This is an upstream issue that has been reported upstream and removed intergrated-terminal-xtermjs labels Oct 10, 2019
@marvingreenberg
Copy link

marvingreenberg commented Nov 15, 2019

Just a note, this breaks any customization of terminal selection color, but maybe that's obvious.

selection

Oh, I figured out how to type a transparent color, "#c000ff00"

@Tyriar
Copy link
Member

Tyriar commented Nov 15, 2019

@marvingreenberg see #84440

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants