Skip to content

Commit b47078f

Browse files
committed
Fix the CustomTextEditor can crash on undo
1 parent 5f25b7c commit b47078f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Core/Sources/SuggestionWidget/CustomTextEditor.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct CustomTextEditor: NSViewRepresentable {
3030
let textView = (context.coordinator.theTextView.documentView as! NSTextView)
3131
guard textView.string != text else { return }
3232
textView.string = text
33+
textView.undoManager?.removeAllActions()
3334
}
3435
}
3536

0 commit comments

Comments
 (0)