diff --git a/src/App.tsx b/src/App.tsx index 98462902..410ce5fd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -69,6 +69,7 @@ const worker = Comlink.wrap( new Worker(new URL("./workers/moc.ts", import.meta.url), { type: "module" }), ); const terminal = new Terminal({ + convertEol: true, cursorBlink: true, fontSize: 14, fontFamily: "monospace", diff --git a/src/webcontainer.ts b/src/webcontainer.ts index 68079a85..d6582b7e 100644 --- a/src/webcontainer.ts +++ b/src/webcontainer.ts @@ -62,7 +62,14 @@ export class Container { args: string[], options?: SpawnOptions, ) { - const process = await this.container!.spawn(cmd, args, options); + const new_options = { + ...options, + terminal: { + cols: this.terminal.cols, + rows: this.terminal.rows, + }, + }; + const process = await this.container!.spawn(cmd, args, new_options); process.output.pipeTo( new WritableStream({ write: (data) => {