-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Allow closing tabs by index #10447
Allow closing tabs by index #10447
Conversation
When running the settings model tests in PowerShell, this is the output I got:
Those paths don't look right to me - I can find the
Also path related - when running
Changing terminal/tools/OpenConsole.psm1 Line 399 in b3b6484
[IO.File]::WriteAllLines("$root/$file", $content) seemed to fix that, though I assumed you wouldn't want that change in the same PR.
|
Only the x86 build failed on a seemingly unrelated test:
|
I thought #10268 fixed this...
Looks like it passed on rerun or push so nevermind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks reasonable to me.
This SO answer would seem to backup the behaviour I'm seeing - apparently .NET objects don't get the cwd of the shell, so I'm not sure how/why it works for others. /cc @j4james |
I don't know the first thing about PowerShell, so I wouldn't be hugely surprised to find out that there was something wrong with my patch, but the above change causes the script to fail for me. I'm running it via the |
Apparently it does...
I think this works because Switching to this seems to make it work in any directory, using $xamls = (git ls-files --full-name "$root/**/*.xaml")
foreach ($file in $xamls) {
$content = Get-Content "$root/$file"
[IO.File]::WriteAllLines("$root/$file", $content)
} |
@ianjoneill Yep. That works for me. |
Gentle bump as this has been open a week with 1 out of 2 approvals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me personally. All comments are absolutely minor.
I'll leave this PR open for a bit in case someone more knowledgeable in these parts of the code has any objections. @msftbot please wait 1 more day before merging this |
Hello @carlos-zamora! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Thanks for the contribution, and sorry for the delay 😄 |
🎉 Handy links: |
Summary of the Pull Request
Updates the
closeTab
action to optionally take an index.PR Checklist
closeTab
should accept anindex
param #7180Validation Steps Performed
Added the following configuration to
settings.json
and validated both key combinations behaved as expected. Also opened the command palette and ensured that the actions were displayed.