Skip un-accented character when undoing after using press-and-hold menu

This commit is contained in:
Nathan Sobo 2017-03-07 22:30:47 -07:00 committed by Antonio Scandurra
parent 00933c7c63
commit ec9115e749

View File

@ -654,6 +654,12 @@ class TextEditorComponent {
this.compositionCheckpoint = null
}
// Undo insertion of the original non-accented character so it is discarded
// from the history and does not reappear on undo
if (this.accentedCharacterMenuIsOpen) {
this.getModel().undo()
}
this.getModel().insertText(event.data, {groupUndo: true})
}