gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.93k stars 1.26k forks source link

Closing the last active terminal does not also close the Vscode terminal pane #2691

Open mistrate opened 1 year ago

mistrate commented 1 year ago

Description

More information can be found here where it was originally reported: https://github.com/microsoft/vscode/issues/165067

Steps to reproduce:

  1. Install vscode
  2. Install GitLens
  3. Open the terminal (Ctrl + ` by default)
  4. Click the "trash" icon to close the only active terminal
  5. Notice that the pane does not close automatically
  6. Uninstall GitLens and repeat steps 3 & 4
  7. Notice that now the pane closes

Possibly related to https://github.com/gitkraken/vscode-gitlens/issues/2312

GitLens Version

13.6.0

VS Code Version

Version: 1.78.2 (Universal) Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435 Date: 2023-05-10T14:44:45.204Z (1 wk ago) Electron: 22.5.2 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 22.4.0 Sandboxed: Yes

Git Version

git version 2.39.2

Logs, Screenshots, Screen Captures, etc

No response

eamodio commented 1 year ago

As mentioned here: https://github.com/microsoft/vscode/issues/165067#issuecomment-1557344617, GitLens seems to be triggering this, but it's a VS Code bug.

I'll leave this open for now, but I don't see what GitLens could be doing to cause this never mind stop doing to avoid it.

JosiahBull commented 4 months ago

I started having this problem recently too, given it was recent I started diffing the ~/.config/Code files against last week's backup.

Tracked it down to a configuration value in ~/.config/Code/User/globalStorate/state.vscdb. Specifically, it seems to be a corrupted views.customizations setting (SELECT * FROM ItemTable WHERE key="views.customizations";).

Reverting this row to the backup resolved the issue. Deleting the row entirely also resolved the issue.

For reference, the corrupted row data that was causing this bug was:

{"viewContainerLocations":{},"viewLocations":{"gitlens.views.graph":"terminal","gitlens.views.graphDetails":"terminal"},"viewContainerBadgeEnablementStates":{}}

Unfortunately the vscode issue has been closed now and locked now, as this could be useful debugging information for both parties.