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

Invoking choice from Show CodeLens Commands For Current Line may require multiple Enters or clicks #191908

Closed
gjsjohnmurray opened this issue Aug 31, 2023 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug code-lens insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@gjsjohnmurray
Copy link
Contributor

gjsjohnmurray commented Aug 31, 2023

Type: Bug

  1. Set "typescript.referencesCodeLens.enabled": true
  2. Open a .ts file.
  3. Put cursor on a line that has an N references CodeLens above it.
  4. Open Command Palette and run Show CodeLens Commands For Current Line.
  5. Press Enter to try and run the selected (only) entry (N references).

🐛 nothing happens until you press Enter a second time (or more...).

Results of using a mouse-click to try and run the CodeLens from the quickpick is the same. First click does nothing, and a second click is required.

This also happens in 1.81.1 so it is not a 1.82 regression.

VS Code version: Code - Insiders 1.82.0-insider (e7756c8, 2023-08-31T05:33:59.698Z)
OS version: Windows_NT x64 10.0.22621
Modes:

@gjsjohnmurray
Copy link
Contributor Author

Seems to be caused by this code that arrived in b5d3ec5 when @jrieken was fixing #139910

if (model.isDisposed) {
// retry whenever the model has been disposed
return await commandService.executeCommand(this.id);
}

@jrieken jrieken added this to the September 2023 milestone Aug 31, 2023
@jrieken
Copy link
Member

jrieken commented Aug 31, 2023

I can reproduce. The code lens model is disposed because the focus lost/gain cycle retriggers its computation and then the picker restarts (to make sure a fresh item is selected)...

@gjsjohnmurray gjsjohnmurray changed the title Invoking choice from Show CodeLens Commands For Current Line requires 2 Enters or clicks Invoking choice from Show CodeLens Commands For Current Line may require multiple Enters or clicks Aug 31, 2023
@jrieken jrieken closed this as completed in 04f02b5 Sep 1, 2023
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Sep 1, 2023
@gjsjohnmurray
Copy link
Contributor Author

/verified

@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 6, 2023
@andreamah andreamah added the verified Verification succeeded label Sep 27, 2023
@andreamah
Copy link
Contributor

Added verified tag, as this was author-verified

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug code-lens insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants