Skip to content

Fixes #7749 - Focus on CodeLens click - #9249

Merged
Alexandru Dima (alexdima) merged 2 commits into
microsoft:masterfrom
eamodio:code-lens-focus
Aug 16, 2016
Merged

Alexandru Dima (alexdima) merged 2 commits into
microsoft:masterfrom
eamodio:code-lens-focus

Conversation

@eamodio

Copy link
Copy Markdown
Contributor

Also focus & move cursor position on click of the empty (unlinked) area of a CodeLens line

#7749

I wanted to create a const for codeLensWidget, but wasn't sure where it should go. Also not sure if that is the right (best) way to tell if it is a codelens.

Let me know if anything needs updating.

Thanks!

Focus & move cursor position on click of the empty (unlinked) area of a CodeLens line
@msftclas

Hi Eric Amodio (@eamodio), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

this._mouseDownOperation.start(t.type, e);
e.preventDefault();
}
} else if (targetIsWidget && (<string>t.detail).indexOf('codeLensWidget') === 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a layer breaker -- the editor core should not know about specific widgets. We perhaps need something similar to shouldSuppressMouseDownOnViewZone but with content widgets

@alexdima

Copy link
Copy Markdown
Member

Eric Amodio (@eamodio) The change is good overall, but there is a layer breaker where the core editor should not know about specific widgets. Usually, this sounds like an addition to the editor API. To overcome this layer breaker, I suggest to add a new optional flag on IContentWidget at https://github.com/Microsoft/vscode/blob/master/src/vs/editor/browser/editorBrowser.ts#L273 and use that flag in the editor core to decide if mouse down should be handled by the editor, and then exercise the flag from the code lens widget

@alexdima Alexandru Dima (alexdima) added the polish Cleanup and polish issue label Jul 14, 2016
@eamodio

Copy link
Copy Markdown
Contributor Author

alexandrudima Ah, makes perfect sense -- will look at adding that. Thanks!

Isolates the editor from knowing about specific widgets
@eamodio

Copy link
Copy Markdown
Contributor Author

alexandrudima I think I've resolved the layer break now -- please let me know if there are any other issues or anything to be addressed.

Thanks!

@eamodio

Copy link
Copy Markdown
Contributor Author

alexandrudima Just wanted to check in on this -- all look ok?

@alexdima Alexandru Dima (alexdima) added this to the August 2016 milestone Aug 16, 2016
@alexdima

Copy link
Copy Markdown
Member

Eric Amodio (@eamodio) Looks great! Thank you!

@alexdima
Alexandru Dima (alexdima) merged commit ca979fc into microsoft:master Aug 16, 2016
@eamodio

Copy link
Copy Markdown
Contributor Author

alexandrudima awesome! Thank you!

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

polish Cleanup and polish issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants