Skip to content

Commit c6fc42d

Browse files
committed
move smartdashed/autocapitalization to makeUIView
1 parent 52432c2 commit c6fc42d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Sources/CodeEditor/UXCodeTextViewRepresentable.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ struct UXCodeTextViewRepresentable : UXViewRepresentable {
195195
textView.indentStyle = indentStyle
196196
textView.isSmartIndentEnabled = flags.contains(.smartIndent)
197197
textView.autoPairCompletion = autoPairs
198-
textView.autocapitalizationType = .none
199-
textView.smartDashesType = .no
200198

201199
if source.wrappedValue != textView.string {
202200
if let textStorage = textView.codeTextStorage {
@@ -271,6 +269,10 @@ struct UXCodeTextViewRepresentable : UXViewRepresentable {
271269
textView.autoresizingMask = [ .flexibleWidth, .flexibleHeight ]
272270
textView.delegate = context.coordinator
273271
textView.textContainerInset = edgeInsets
272+
#if os(iOS)
273+
textView.autocapitalizationType = .none
274+
textView.smartDashesType = .no
275+
#endif
274276
updateTextView(textView)
275277
return textView
276278
}

0 commit comments

Comments
 (0)