Closed ankitjainhere closed 2 years ago
It appears that gitlens uses an ellipsis as a placeholder for "Recent change" information. If that feature is enabled, text along the lines of "AUTHOR, TIME ago | X authors (AUTHOR)" appears at the top of files and code blocks. When the user begins editing the file, that text appears to be replaced with "...". A few seconds after the user has stopped editing, gitlens seems to refresh and display the (potentially updated) recent change text.
The problem arises when a file is untracked. Since there is no recent change information to speak of, gitlens does not display it. However, if the top of the file is visible, a file-level ellipsis is displayed when editing, which causes a new line to appear and the code on-screen to jerk down and then back up again once editing has ceased. A stack overflow user suggested that disabling the recent changes feature will fix this, but it does not.
This is hopefully a simple fix: before taking any action to modify display, gitlens could simply check if the file in the focused editor pane is being tracked and do nothing if not. Might someone who knows the code dig in and make the fix?
Confirmed fixed in v12.0.1.
Seem to be back in v12.0.5
@moop-moop Can you capture a video of what you are seeing?
@eamodio see mine https://github.com/microsoft/vscode/issues/146379
I confirm the version is v12.0.5
@xiangnanscu
The existance of ...
is by design -- because once you start editing the file the blame CodeLens become "invalid", and if I remove them the file will jump around, so I replace them with ...
until the file is saved or 5s has passed since the last edit. If you want to avoid the ...
you can decrease the default (5s) timeout using the "gitlens.advanced.blame.delayAfterEdit"
setting. This can avoid the ...
and update the CodeLens more quickly, but it will cause more processing to because it will have to more regularly re-compute the blame.
You can also control the string (e.g. ...
) that shows up in this case too:
"gitlens.strings.codeLens.unsavedChanges.authorsOnly": "$(loading~spin)",
"gitlens.strings.codeLens.unsavedChanges.recentChangeAndAuthors": "$(loading~spin)",
"gitlens.strings.codeLens.unsavedChanges.recentChangeOnly": "$(loading~spin)",
Setting it to the above will cause it to look like a loading spinner. Or you can set it to an empty string, or whatever.
But the ...
shouldn't show up, and then completely disappear causing the file to jump, which is what this bug was about.
@eamodio OK. thanks for the tip.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Steps to Reproduce:
For reference go to this link ( someone reported same issue on vscode repository ): [https://github.com/microsoft/vscode/issues/111472#issue-752993771]()