         if (this.historyIndex !== -1) {
                                    this.historyBuffer[this.historyIndex] =
                                        this.history[this.historyIndex];
                                }
                                this.history.push(value.slice(0, -1));
                                this.historyBuffer.push(value.slice(0, -1));
                                this.historyIndex = -1;
                                this.cursorPosition = 0;
                           