This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
allow turning off auto tracking of active pane #1336
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Enhance the tree-view config to allow turning off the behavior to change the tree selection when the active pane item changes.
Moved tree-view:autoReveal config into a config object that also has an enable boolean
tree-view's onDidChangeActivePaneItem handler now 1) migrates the old autoReveal to new autoTrackActivePane.autoReveal (if its present) and 2) uses autoTrackActivePane.enable to decide whether to call selectActiveFile and revealActiveFile
Alternate Designs
Considered changing autoReveal to an enum. See #1335
Benefits
Backward compatible with previous behavior and now allows a new behavior. See #1335
Possible Drawbacks
If other packages use tree-view:autoReveal they should eventually be updated to use autoTrackActivePane.autoReveal instead but in the mean time the impact should not be severe. If they enable autoReveal, it will still take effect because of the migration condition in the code.
Applicable Issues
#1335