Skip to content

Commit

Permalink
Allow async onLine
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 16, 2024
1 parent 5f67f96 commit 836fa4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface ShellContext extends Required<ShellOptions> {
inputs: string[];
}

function handleData($: ShellContext, data: string) {
async function handleData($: ShellContext, data: string) {
if ($.index == -1) {
$.currentInput = $.input;
}
Expand Down Expand Up @@ -99,7 +99,7 @@ function handleData($: ShellContext, data: string) {
$.inputs.unshift($.input);
}
$.terminal.write('\r\n');
$.onLine($.input);
await $.onLine($.input);
$.index = -1;
$.input = '';
$.terminal.write($.prompt);
Expand Down

0 comments on commit 836fa4e

Please sign in to comment.