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

[editor]: EditorManager#currentEditor behaves incorrectly after a file rename #12139

Open
kittaakos opened this issue Feb 2, 2023 · 0 comments

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Feb 2, 2023

Bug Description:

When I rename a file, and the Explorer view is not visible, EditorManager#currentEditor provides an incorrect result after the rename.

Steps to Reproduce:

Use the additional custom commands from my fork to reproduce the defect: master...kittaakos:theia:current-editor-after-rename

There are two commands:

  • Toast the URI of the current editor with the Ctrl/⌘+K K keychord.
  • Perform a rename of the current editor with the Ctrl/⌘+K R keychord.
  1. Open a workspace with two files: a.txt and b.txt. Toggle the Explorer view. You do not see the file tree. This is important not to involve the SelectionService.
  2. Select a.txt and use the keychord to toast the current URI. It works.
  3. Select b.txt and use the same keychord to toast the current URI. It works.
  4. When the active editor is b.txt, use the other keychord to rename the editor. Rename b.txt to c.txt. It works. The current editor in the UI is c.txt after the rename.
  5. Use the keychord to toast the current editor URI. It prints a.txt, although c.txt is the current one in the UI. It's a bug.
current_editor_bug_after_rename.mp4

Additional Information

  • Operating System:
  • Theia Version: b28c8b9
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

No branches or pull requests

1 participant