-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
Repro steps:
- Run "Gitlens: Enable debug logging" command
- Open the Output panel in VS Code and select "GitLens" in the dropdown to see the debug logs
- Turn on File Blame (run the "Gitlens: Toggle File Blame" command)
- Type a character to edit the current file
Expected: The File Blame annotations should disappear.
Actual: The File Blame annotations remain, and editing becomes janky (newly typed characters appear inside the blame gutter).
I did some debugging and tracked this down to a problem with the debounce behavior for the onTextDocumentChanged event at
| workspace.onDidChangeTextDocument(debounce(this.onTextDocumentChanged, 50), this), |
The problem is that it is debouncing events that can come from different sources. In this case, a change event is first fired for the active file. Then, within the debounce timeframe, a change event is fired for the output window. so the first event (from the active file) gets dropped. The event for the output window gets processed, but since it's for the output window, it doesn't have any effect.
GitLens Version
13.5.0
VS Code Version
Version: 1.78.0
Commit: 252e5463d60e63238250799aef7375787f68b4ee
Date: 2023-05-03T20:15:29.774Z
Electron: 22.4.8
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.4.0
Sandboxed: No
Git Version
2.39.1
