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

Fix Navigator Key Navigation Explosion #1803

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

thecoolwinter
Copy link
Collaborator

Description

Fixes an issue discussed a few different times with the navigator.

To reproduce:

  • Enable "reveal in project navigator" setting.
  • Select a file
  • Using the arrow keys, move up or down to a folder in the navigator
  • Eventually, the app will freeze.

This fixes that bug, and another one I found on the way.

In this PR:

  • Add a few more cases where shouldSendSelectionUpdate in the navigator outline view needed to be set. In these cases, extra selection events were being sent back to the navigator when a tab was opened. This was one of the reasons for the freeze as a few files were being opened over and over again.
  • Removes a call to updateSelection when receiving a notice that the directory monitor has updated. This was causing an issue where, when revealing a previously unloaded directory, the selection would jump back to the opened tab rather than staying on the folder being opened.
  • Cleans up some of the editor history code, adding a few methods and moving as much history code as possible to an extension.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen.Recording.2024-07-09.at.10.26.18.PM.mov

@thecoolwinter thecoolwinter merged commit 451d4c2 into CodeEditApp:main Jul 14, 2024
2 checks passed
@thecoolwinter thecoolwinter deleted the fix/history-explosion branch July 14, 2024 20:55
@austincondiff austincondiff added the bug Something isn't working label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working navigator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 Reveal in Project Navigator not working
5 participants