Vscode-gitlens: CodeLens disappears/and reappears when auto-saving.

Created on 15 Jan 2018  路  11Comments  路  Source: eamodio/vscode-gitlens

Is it possible to not remove the gitlens annotation above a function when the file is saved/saving.
This leads to a lot of jumping around as vscode autosaves after delay, and just doesn't look very nice.

Note: this was extremely visible when editing a readme.md file

  • GitLens Version: 7.5.2
  • VSCode Version: 1.19.2
  • OS Version: osx 10.12.6

Steps to Reproduce:

  1. set files.autoSave to afterDelay
  2. edit a file, and pause your typing long enough for vscode to autosave.
  3. repeat step two until you feel uncomfortable with the bouncing source code.

Git Code Lens

CodeLens annotations should disappear and reappear after auto save.

bug

Most helpful comment

7.5.3 is out now. Please let me know if you are still experiencing any issues. And again sorry for the inconvenience!

All 11 comments

I think I Phrased this wrong. CodeLens annotation disappears when the file is being modified. The issue really is it appearing/disappearing after the a short delay due to file.autoSave being set to afterDelay saving after a short delay.

I just came here for the first time to open a very similar issue but more generic: Avoid all the "jumping" the occurs in all cases (every time you open a file, modify it, ...).

Gitlens could show an empty space while it doesn't yet have the information.

Notice how it jumps:
gif

@SteelPhase this is a bad regression in 7.5 -- this will be fixed in 7.5.3 which will be out shortly. Sorry about that!

@brunolemos unfortunately there is nothing GitLens can do about that -- that is the way vscode behaves when dealing with code lens -- it always discards and refreshes them on tab switch.

7.5.3 is out now. Please let me know if you are still experiencing any issues. And again sorry for the inconvenience!

@eamodio congrats on the speed of the fix & ship!

@eamodio I don't know the API but could you avoid the jumping by quickly resolving to empty strings so that CodeLens lines are immediately as tall as they will be with data and then just backfill the data? This is a hack and I don't think it should be done, but in theory it would work as long as there isn't some perceivably long intrinsic delay before the file is open and CodeLens is invoked which would stay there even if the initial load resolved immediately.

vscode delays even asking for code lens, until after the tab has been switched -- so it will show without code lens before it even asks for them. I would recommend opening an issue with vscode (although there probably is one already honestly) to make the code lens rendering behavior smoother.

Agreed this should be resolved in VS Code proper so all extensions can benefit from it, although I am not bothered by the current behavior and I expect there is a performance trade-off precursor to the decision to delay, so I'll leave this be. Thank you for explaining. :-)

So have anyone reported this to the VS Code team?

@RedTailBullet My guess is it has been reported many times, but I also highly doubt they will change the behavior. The current behavior allows them to decouple the loading of the code from any delays/overhead extensions might add. This allows them to keep the coding experience fast.

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.

Was this page helpful?
0 / 5 - 0 ratings