    // Hack to allow stdout/stderr to finish before we figure out where input starts
                    setTimeout(() => {
                        this.inputStartCursor =
                            this.xterm.buffer.active.cursorX;
                    }, 1);
                    // If line buffer has a line ready, send it immediately
                    if (this.inputBuffer.hasLineReady()) {
                        return new Promise((resolve, reject) => {
                            resolve(
             