🐛 Fix repeated CWD entries when creating new terminal in multi-root workspace#153204
Merged
Tyriar merged 6 commits intomicrosoft:mainfrom Nov 8, 2022
Merged
Conversation
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
…er picker command) Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
meganrogge
previously approved these changes
Sep 9, 2022
Tyriar
approved these changes
Nov 8, 2022
Member
Tyriar
left a comment
There was a problem hiding this comment.
Works well 👍 sorry about the delay getting to this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes #153125
Tests to verify the correct dropping of repeated CWDs were added.
In the screenshot:
dir-a/.vscode/settings.json, the CWD fordir-ais set to../dir-b. Due to this,dir-awas dropped from the picker list.dir-d/.vscode/settings.json, the CWD fordir-dis set to..(parent directory). Since just showingdir-dand its path in the picker makes no sense to the user, it is shown with an "(Overridden)" indicator followed by the actual CWD to clarify the user.Since the
PICK_WORKSPACE_FOLDER_COMMANDis a general-purpose functionality which is used in different places, I opted to locally implement the picker within the terminal module.@Tyriar Although the fix seems to work, there are two other instances in the codebase where the CWD picker does not respect the
terminal.integrated.cwdparameter. Please check these and tell me whether to fix them.terminalActions.ts#L62:
terminalActions.ts#L2453: