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

Restore selection in Monaco editor options #11049

Merged

Conversation

colin-grant-work
Copy link
Contributor

What it does

Fixes #11017 by restoring the logic to extract the selection from the options passed to the MonacoEditorService. Previously, the relevant fields had been added to the IResourceEditorInput declaration in our monaco.d.ts, but in fact they come from an extension of that interface, the ITextResourceEditorInput. The new code checks whether the input we're dealing with satisfies the latter and extracts the selection if possible.

How to test

  1. ctrl+click on variables / methods imported from / defined in other files.
  2. Observe that the file opens and scrolls to the definition / declaration of the relevant method.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added the monaco issues related to monaco label Apr 21, 2022
@colin-grant-work colin-grant-work added this to the 1.25.0 milestone Apr 21, 2022
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirm that the changes fix the issue 👍

@colin-grant-work colin-grant-work merged commit 148f1b1 into eclipse-theia:master Apr 21, 2022
@colin-grant-work colin-grant-work deleted the bugfix/opener-options branch April 21, 2022 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Monaco] Go to definition or references does not scroll to desired location
2 participants