               this.xterm.write("\x1b[" + trailing.length + "D");
                    }
                    this.updateHistory();
                }

                handleTab() {
                    // handle tabs: from the current position, add spaces until
                    // this.cursorPosition is a multiple of 4.
                    const prefix = this.input.slice(0, this.cursorPosition);
                    const suffix = this.input.slice(this.cursorPosition);
                    const count = 4 - (