microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.91k stars 28.76k forks source link

When VSCode receives focus from another window, the cursor in the editor area is white/invisible on a light theme for period of time #216689

Open BladeMF opened 3 months ago

BladeMF commented 3 months ago

Does this issue occur when all extensions are disabled?: Yes.

Version: 1.90.2 (user setup) Commit: 5437499feb04f7a586f677b155b039bc2b3669eb Date: 2024-06-18T22:34:26.404Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

  1. Open VSCode with Light theme and open a blank file, place cursor in file
  2. Make sure left/right pane is open (with Explorer and other tool windows)
  3. Focus another window
  4. Return to VSCode

Now the cursor is white. You need to wait a couple of seconds for the color to change. Subsequent repetitions may result in faster or slower time until color is black again. In normal working conditions practically every alt-tab results in 3-4 seconds of "where is my cursor".

BladeMF commented 3 months ago

It definitely has something to do with the terminal. At one point, after working whole day, if the terminal is open the cursor in the editor area is permanently white. If I switch to Explorer (which is together with the Terminal in the sidebar), then it becomes black. If I turn off the whole sidebar, it becomes black.

BladeMF commented 3 months ago

Right, the colour scheme of the terminal does not seem to affect this. I tried removing my integrated terminal colour customisations so it was just as the theme defined it and the cursor still becomes white for a second when alt-tabbing.

BladeMF commented 3 months ago

If in the primary tab is displayed the "Output" pane, then if I click consecutively between the editor and the Output pane, the cursor becomes white when I click and then black a second later. That happens in either of them without the main window losing focus.

Also, if for some reason the cursor becomes stuck being white, closing the sidebar changes the colour.

meganrogge commented 2 months ago

Can you pls provide a gif?

BladeMF commented 2 months ago

Sure. I hope I'll get the time to do it today.

BladeMF commented 2 months ago

I kid you not, this does not happen when any screen recorder is running. I tried the built in and OBS. Here is what the test is, you can repeat it. It happens every time with me - every 1-3 clicks the cursor becomes white for a while. It's not a gif, but I can't get Clipchamp to start so I can't edit it.

https://github.com/microsoft/vscode/assets/12109622/b2f78201-e1fd-467b-93a7-ffbeddb2029d

BladeMF commented 2 months ago

The theme is "Light+" on both.