Skip to content

Commit

Permalink
πŸ› Fix abe33#93 Issue
Browse files Browse the repository at this point in the history
Reference source
abe33#93 (comment)
  • Loading branch information
k-utsumi committed Jul 9, 2021
1 parent fc5f07c commit b5b659a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/table-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,10 @@ class TableElement extends HTMLElement {
const cursorValue = cursor.getValue()
this.editor.setText(String(cursorValue || this.getUndefinedDisplay()))

this.editor.getBuffer().history.clearUndoStack()
this.editor.getBuffer().history.clearRedoStack()
if (this.editor.getBuffer().history != undefined) {
this.editor.getBuffer().history.clearUndoStack()
this.editor.getBuffer().history.clearRedoStack()
}

if (initialData) { this.editor.setText(initialData) }
}
Expand Down Expand Up @@ -1353,8 +1355,10 @@ class TableElement extends HTMLElement {
this.editorElement.focus()
this.editor.setText(this.columnUnderEdit.name != null ? this.columnUnderEdit.name : columnName(columnIndex))

this.editor.getBuffer().history.clearUndoStack()
this.editor.getBuffer().history.clearRedoStack()
if (this.editor.getBuffer().history != undefined) {
this.editor.getBuffer().history.clearUndoStack()
this.editor.getBuffer().history.clearRedoStack()
}
}
}

Expand Down

0 comments on commit b5b659a

Please sign in to comment.