Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer stateless array over gitlens:activeFileStatus #3284

Open
hediet opened this issue May 14, 2024 · 0 comments
Open

Prefer stateless array over gitlens:activeFileStatus #3284

hediet opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working triage Needs to be looked at

Comments

@hediet
Copy link

hediet commented May 14, 2024

Description

Gitlens sets activeFileStatus as a reaction to the user changing the active text editor.
This causes flickering of the editor toolbar, as git lens registers commands that use a specific value of activeFileStatus as precondition and this context key is updated asynchronously:

SGlOss2CNb

Instead of gitlens:activeFileStatus: tracked|blameable|remotes|, I suggest to have various arrays:

  • gitlens:trackedFiles: [...]
  • gitlens:blameableFiles: [...]
  • gitlens:remotesFiles: [...]

Then, you can use the in operator.

You can still lazily update these arrays depending on the active editor, but then at least it only flickers once (when current editor uri is initially added to the array) and not on every switch.

GitLens Version

latest

VS Code Version

latest

Git Version

latest

Logs, Screenshots, Screen Captures, etc

No response

@hediet hediet added bug Something isn't working triage Needs to be looked at labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs to be looked at
Projects
None yet
Development

No branches or pull requests

1 participant