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

Add editorLineNumber context key #176659

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Conversation

joyceerhl
Copy link
Collaborator

Re: #175945

@joyceerhl joyceerhl enabled auto-merge (squash) March 9, 2023 17:23
@joyceerhl joyceerhl self-assigned this Mar 9, 2023
@vscodenpa vscodenpa added this to the March 2023 milestone Mar 9, 2023
return;
}

const anchor = { x: e.event.posx, y: e.event.posy };
const lineNumber = e.target.position.lineNumber;

const contextKeyService = this.contextKeyService.createOverlay([['editorLineNumber', lineNumber]]);
Copy link
Member

@connor4312 connor4312 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to dispose this after you close the menu.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about that, but every other consumer of createOverlay doesn't dispose it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth an issue for the other cases then--and I'll update this PR to dispose it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like dispose no-ops on it, so probably okay.

Copy link
Member

@connor4312 connor4312 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the better thing would splitting out the IContextKeyService interface so that .dispose() doesn't have to be defined on something that doesn't need to be disposed.

@joyceerhl joyceerhl merged commit b86be33 into main Mar 9, 2023
@joyceerhl joyceerhl deleted the dev/joyceerhl/alert-centipede branch March 9, 2023 17:41
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants