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

Focused Editor Context Not Updated When New Editor Focused #9042

Closed
colin-grant-work opened this issue Feb 8, 2021 · 0 comments · Fixed by #9013
Closed

Focused Editor Context Not Updated When New Editor Focused #9042

colin-grant-work opened this issue Feb 8, 2021 · 0 comments · Fixed by #9013

Comments

@colin-grant-work
Copy link
Contributor

Bug Description:

EditorWidget has a handler for onSelectionChanged that updates the global selection to the current editor. However, that code does not fire if the user switches editors without moving the cursor in the new editor.

Steps to Reproduce:

(see #9013)

  1. Clone https://github.com/avishaik/vscode-editor-btn-bug

  2. update the when statement in the package.json in contributes -> menus -> editor/title to:
    "resource =~ /^(.)/pages/(.)$/ && editorLangId == json && editorFocus == true"

  3. Build it: npm run package and add it as extension to Theia

  4. Create a .json file on the root folder

  5. Create a 'pages' folder and create another .json file in this folder

  6. Open both files side by side

  7. Move the cursror in the JSON file.

  8. Observe that the icon appears for the JSON file.

  9. Activate the markdown editor without moving the cursor.

  10. Observe that the icon still appears

Additional Information

  • Operating System: RHEL
  • Theia Version: master (2/8/2021)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant