Does this issue occur when all extensions are disabled?: Probably, but that's hard to test
- VS Code Version: 1.69.0-insider and 1.68
- OS Version: Linux x64 5.17.9-1-MANJARO
There are a few issues related to terminals in editor tabs (instead of the dedicated terminal pane).
onDidCloseTerminal does not trigger when underlying process dies
Steps to Reproduce:
- Run the
terminal-sample extension
- Use the
terminalTest.createTerminal command
- Drag the resulting terminal into the main workspace (or set
terminal.integrated.defaultLocation to editor beforehand)
- Close the terminal by killing the underlying process (e.g. ^D in your shell)
- No
onDidCloseTerminal notification appears.
terminal.exitCode is not set when underlying process dies
I assume this has the same root cause as the first issue. To repro, follow the steps outlined above and then
- set a breakpoint in the
terminalTest.show handler
- Use the
terminalTest.show command and select the terminal you just created (and closed)
- Check that
terminal.exitCode === undefined in the debugger.
Terminal's viewColumn is inaccessible
It's easy enough to open a terminal in a viewColumn, but there's no robust way to query where a terminal currently is. Terminal doesn't expose a viewColumn property and the new tab API's tab.input property doesn't point back to a specific terminal either.
This means that if an extension provides a command to create and show a terminal, it's impossible to show it at the same position the user had it before; a WebviewPanel.onDidChangeViewState API would help with that.
Does this issue occur when all extensions are disabled?: Probably, but that's hard to test
There are a few issues related to terminals in editor tabs (instead of the dedicated terminal pane).
onDidCloseTerminaldoes not trigger when underlying process diesSteps to Reproduce:
terminal-sampleextensionterminalTest.createTerminalcommandterminal.integrated.defaultLocationtoeditorbeforehand)onDidCloseTerminalnotification appears.terminal.exitCodeis not set when underlying process diesI assume this has the same root cause as the first issue. To repro, follow the steps outlined above and then
terminalTest.showhandlerterminalTest.showcommand and select the terminal you just created (and closed)terminal.exitCode === undefinedin the debugger.Terminal's
viewColumnis inaccessibleIt's easy enough to open a terminal in a
viewColumn, but there's no robust way to query where a terminal currently is.Terminaldoesn't expose aviewColumnproperty and the new tab API'stab.inputproperty doesn't point back to a specific terminal either.This means that if an extension provides a command to create and show a terminal, it's impossible to show it at the same position the user had it before; a
WebviewPanel.onDidChangeViewStateAPI would help with that.