vscode: Support location in TerminalOptions #12006
Merged
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.
What it does
Support
location
in TerminalOptions, whereaslocation
can beTerminalLocation
enum with the valuesEditor
andPanel
TerminalEditorLocationOptions
object which contains aViewColumn
and an optionalpreserveFocus
booleanViewColumn
can beActive
,Besides
, or an explicit column fromOne
toNine
TerminalSplitLocationOptions
object which contains aparentTerminal
that is supposed to be split.Contributed on behalf of STMicroelectronics
Fixes #11506
How to test
plugins
folder.Open terminal in editor
opens a terminal in the main areaOpen terminal in panel
opens a terminal in the bottom areaOpen terminal with TerminalSplitLocationOptions
splits the provided parent terminal, the test extension uses the most recent one as parent argumentApparently, this one is currently broken in VS Code and just opens a terminal/tab in the panel area without splitting anything
Open terminal with TerminalEditorLocationOptions
provides quick picks for ViewColumn and PreserveFocusApparently this is currently broken in VS Code, it seems to always open a tab in the first column. No idea what is actually supposed to happen - maybe tab in active column if there already is a terminal?
Review checklist
Reminder for reviewers
Footnotes
The VSCode API specification and the current behavior of VSCode seems to be misaligned and at least partly broken in VSCode. ↩