Fix: terminal focus-on-open and exit message
This commit is contained in:
parent
d020f41b89
commit
5ac4d3d7cf
|
|
@ -54,6 +54,9 @@ export function addTerminal() {
|
|||
const term = new Terminal();
|
||||
editors[currentTab.val].push(vanX.noreactive(term));
|
||||
term.focus();
|
||||
setTimeout(() => {
|
||||
term.focus();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
const TabHeader = (tab: State<Editor[]>, del: () => void, k: number) =>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export class Terminal implements Displayable {
|
|||
this.terminalId,
|
||||
(exitCode) => {
|
||||
this.term.writeln(
|
||||
`\r\n[Process exited with code ${exitCode}]\n"Press any key to close..."`,
|
||||
`\r\n[Process exited with code ${exitCode}]\r\nPress any key to close...`,
|
||||
);
|
||||
|
||||
this.term.onData(() => this.close());
|
||||
|
|
@ -108,6 +108,7 @@ export class Terminal implements Displayable {
|
|||
}
|
||||
|
||||
focus() {
|
||||
this.dom.scrollIntoView();
|
||||
this.term.focus();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue