(text)
| 1514 | }, |
| 1515 | |
| 1516 | pushHistory(text) { |
| 1517 | const value = String(text || ""); |
| 1518 | if (this._history[this._historyIndex] === value) return; |
| 1519 | this._history = this._history.slice(0, this._historyIndex + 1); |
| 1520 | this._history.push(value); |
| 1521 | if (this._history.length > MAX_HISTORY) this._history.shift(); |
| 1522 | this._historyIndex = this._history.length - 1; |
| 1523 | }, |
| 1524 | |
| 1525 | undo() { |
| 1526 | if (this.sourceEditor && this.isSourceMode()) { |