cursorPosition + 1,
                        );
                        this.input =
                            this.input.slice(0, this.cursorPosition) + trailing;
                        this.clearLine();
                        if (trailing.length !== 0) {
                            this.xterm.write(trailing);
                            this.xterm.write("\x1b[" + trailing.length + "D");
                        }
                        this.updateHistory();
                    }
                }

    