Vscode: Terminal Cursor Ghosting When Window Zoom Set To -1

Created on 18 Sep 2020  路  25Comments  路  Source: microsoft/vscode

Issue Type: Bug

  1. Set "window.zoomLevel": -1
  2. Click into terminal window (Tested using powershell terminals both integrated and included)
  3. Remove cursor from window
  4. Place cursor in window and press enter to new line.
  5. Observe square cursor ghosting outline

Expected Result: No ghosted cursor outline when moving to new line in terminal
Ghosting

VS Code version: Code 1.49.1 (58bb7b2331731bf72587010e943852e13e6fd3cf, 2020-09-16T23:27:51.792Z)
OS version: Windows_NT x64 10.0.18363

Extensions (5)

Extension|Author (truncated)|Version
---|---|---
bracket-pair-colorizer-2|Coe|0.2.0
prettier-vscode|esb|5.6.0
powershell-preview|ms-|2020.9.0
material-icon-theme|PKi|4.3.0
vscodeintellicode|Vis|1.2.10

(1 theme extensions excluded)


bug gpu integrated-terminal integrated-terminal-rendering windows

Most helpful comment

Can anyone confirm whether "terminal.integrated.rendererType": "experimentalWebgl" also works around the issue?

All 25 comments

Same issue here.

Code_2020-09-20_18-42-41

Yup @AxonneQ that's exactly what my terminal looks like after a while. Really annoying and distracting.

Can you share your settings.json file? A workaround is to set terminal.integrated.rendererType to dom

{
"workbench.iconTheme": "material-icon-theme",
"[powershell]": {
"editor.renderWhitespace":"selection",
"editor.renderControlCharacters": false,
"files.trimTrailingWhitespace": true,
"files.encoding": "utf8bom",
"files.autoGuessEncoding": true,
"editor.tabCompletion": "on"
},
"bracket-pair-colorizer-2.activeScopeCSS": [
"borderStyle : solid",
"borderWidth : 2px",
"borderColor : {color}",
"opacity: 0.8"
],
"bracket-pair-colorizer-2.showBracketsInGutter": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.shell.windows": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe",
"files.autoSave": "afterDelay",
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.integratedConsole.suppressStartupBanner": true,
"terminal.integrated.automationShell.linux": "",
"powershell.powerShellDefaultVersion": "Windows PowerShell (x64)",
"powershell.codeFormatting.useCorrectCasing": true,
"terminal.integrated.cursorBlinking": false,
"workbench.colorCustomizations": {
"terminalCursor.foreground": "#FFFFFF",
"terminalCursor.background": "#1e1e1e"
},
"workbench.view.alwaysShowHeaderActions": true,
"window.zoomLevel": -1
}

Looks like the issue is with the window.zoomLevel: -1 when the value is 0 or higher, ghosting disappears. Kind of sucks since on 1440p, the UI is a bit too big for me. that's why I zoomed it out.

Can you try close vscode and launch using code --disable-featuers="LayoutNG" to see if the issue still happens?

Can you try close vscode and launch using code --disable-featuers="LayoutNG" to see if the issue still happens?

Removed the workaround and tried starting using what you suggested. Issue is still happening. Here is the output of the command prompt:

C:\Users\jt114881\AppData\Local\Programs\Microsoft VS Code> code --disable-featuers="LayoutNG"
Warning: 'disable-featuers' is not in the list of known options, but still passed to Electron/Chromium.
[main 2020-09-23T23:38:52.827Z] update#setState idle
(node:109112) Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\jt114881\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\vscode-sqlite3\build\Release\sqlite.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:109112) Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\jt114881\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\node-pty\build\Release\conpty.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:109112) Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\jt114881\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\windows-process-tree\build\Release\windows_process_tree.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:109112) Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\jt114881\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\spdlog\build\Release\spdlog.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:113736) Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\jt114881\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules.asar.unpacked\spdlog\build\Release\spdlog.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
[main 2020-09-23T23:39:22.827Z] update#setState checking for updates
[main 2020-09-23T23:39:23.205Z] update#setState idle

Having the same issue here, VSCode 1.49.1, windows 10

Can confirm with Manjaro and the Snap version.

Versi贸n: 1.50.0-insider
Confirmaci贸n: e6a742d2407c4a94c6540b49aa5f801468dbd1c8
Fecha: 2020-09-22T18:12:43.551Z
Electron: 9.3.0
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
Sistema Operativo: Linux x64 5.4.64-1-MANJARO snap

Window zoom level, --disable-features flag have no effect. DOM renderer is a confirmed workaround.

@Tyriar this is still marked as 'needs more info', do you require any more information from me?

I was able to repro with stable but I cannot repro the issue with our insiders https://code.visualstudio.com/insiders/, can others confirm ?

@deepak1556 confirmed issue still happening on latest insiders build as well.
Set it up with the same extensions and settings file, minus the workaround.

I followed your steps and reused same settings but wasn't able to repro the issue with insiders. Attaching the screen recording from both stable and insiders.

cursor_ghosting.zip

I followed your steps and reused same settings but wasn't able to repro the issue with insiders. Attaching the screen recording from both stable and insiders.

cursor_ghosting.zip

See my repro attached.
Confirmation.zip

@deepak1556 unfortunately, it's still ghosting even on insiders build
image

thanks for confirming, couple of things I want to check

let me know which of these work and don't.

thanks for confirming, couple of things I want to check

let me know which of these work and don't.

I have tried code --disable-gpu and it seems that the ghosting has stopped but when you use --disable-features=LayoutNG its still there. The newest chromium runtime does not help too.

@Tyriar considering this is a gpu specific issue, next step would be create a minimal repro and file report in chromium, can you help with that ?

In the meantime users can disable gpu via runtime arguments https://code.visualstudio.com/updates/v1_40#_disable-gpu-acceleration

Same issue. "terminal.integrated.rendererType": "dom" and code --disable-gpu are both confirmed workarounds.
I just want to add that adjusting the size of the terminal makes the effect go away, for me at least, but it comes back after some time.

It also seem that the ghosting only shows when :

  • "window.zoomLevel" is less than 0
  • clicking out of terminal and then getting back in it

here's a gif of how i repro
ghost-cursor

Can anyone confirm whether "terminal.integrated.rendererType": "experimentalWebgl" also works around the issue?

works for me - thanks!

@colinpmillar great to hear! So this is restricted to the canvas renderer that while it is the default, I want to get rid of in favor of webgl with a fallback of dom based on some automatic detection https://github.com/microsoft/vscode/issues/106202. This is after we close the gap in functionality, which I think is only context loss and underline support at this point https://github.com/xtermjs/xterm.js/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Faddon%2Fwebgl

"terminal.integrated.rendererType": "experimentalWebgl" doesn't work for me, unfortunately.

I also noticed that this "cube" shows up on experimentalWebgl , canvas and auto
1

But when i set it on dom this shows up
2

These two pictures shows the cursor when i clic away from the terminal

I also see the "two-lines" cursor that @Ofsen mentions when using the "terminal.integrated.rendererType": "dom" setting!

I also see the "two-lines" cursor that @Ofsen mentions when using the "terminal.integrated.rendererType": "dom" setting!

@Juanpam This sounds like a separate bug as this issue is specifically about canvas changes in Chromium. I don't think that's been reported yet so feel free to create it.

Was this page helpful?
0 / 5 - 0 ratings