-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Clearing formatting results in different background color for different renderers #4120
Comments
@Tyriar Is there an approximate timeframe for resolving this issue? Is it weeks or rather months? I want to keep the default setting in code-server; and documenting workarounds is not ideal. |
This is mostly BCE related (also see https://invisible-island.net/ncurses/ncurses.faq.html#bce_mismatches). From my quick tests it seems the canvas and the webgl renderer work properly, but the DOM renderer does not correctly apply BCE to new lines. Regarding the issue itself: Did not extensively test this, thus there is a chance I missed some other real bug here. I also cannot repro the differences from the color test above, no clue why. |
Canvas renderer does not work properly. The following settings in code-server (aka VS Code) lead to proper rendering of the terminal in Safari:
The following settings lead to improper rendering in Safari:
@jerch: I have whitelisted your GitHub user at https://coder.jupyter.b-data.ch/ so you may have a look at it yourself. |
No worries. I am documenting the workaround, then. |
You mean webgl works properly but canvas does not? Then I am prolly on the wrong track here, for me canvas and webgl behave exactly the same. I wonder if this is a safari only issue (there are some issues with safari at several ends...) |
Yes.
No. There is the same issue with the canvas renderer in Firefox. |
@benz0li Can you give a repro for the issue, how to trigger it? |
@jerch: I have whitelisted your GitHub user at https://coder.jupyter.b-data.ch/ so you may have a look at it yourself. |
I see the following (in FF): From he looks only the webgl renderer has the right output atm. canvas has multiple issues:
DOM has one issue not applying BCE at all. Prompt looks right to me (beside minor offset issues, which cannot be solved, it is a font renderer issue of the browser). So yes there are differences in canvas and webgl. Which xterm.js version is here used? And can you test a different version? (My tests above used 5.1.0, so this either is a regression or got already solved in 5.1.0...) |
@benz0li I'm strapped for time at the moment so probably won't be able to look at it for a while, so more like months unless someone else steps in. |
This issue popped up when VS Code 1.75.0 came out. xterm.js 5.2.0-beta.21; according to https://github.com/microsoft/vscode/blob/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/package.json#L90 |
Yupp, thats a regression in master branch, can repro it there as well. Hmm. |
No issue with VS Code versions using xterm 5.1.0-beta.49 (and maybe other 5.1.0-betas). This must have been introduced with xterm.js 5.2.0. |
Found a possible culprit: xterm.js/addons/xterm-addon-canvas/src/TextRenderLayer.ts Lines 99 to 102 in a359c7c
Commented out these lines, the proper behavior is restored. I introduced these lines in 0b56b56 to greatly speedup the canvas renderer, but was not aware, that it also gets used for BG coloring. This needs a more involved patch to have both good perf and correct behavior, so for now I gonna revert that change --> PR: #4438. |
@jerch Thank you! |
VS Code issue: microsoft/vscode#160497
The rendering of the repro in the linked issue is different in webgl+canvas vs dom
The text was updated successfully, but these errors were encountered: