               }

                handleCursorInsert(data) {
                    const trailing = this.input.slice(this.cursorPosition);
                    this.input =
                        this.input.slice(0, this.cursorPosition) +
                        data +
                        trailing;
                    this.cursorPosition += data.length;
                    this.xterm.write(data);
                    if (trailing.length !== 0) {
                        this.xterm.write(trailing);
         