Skip to content

Commit 70a6b84

Browse files
committed
lint: fix linter
1 parent c4f2cb1 commit 70a6b84

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Example/CodeEditTextViewExample/CodeEditTextViewExample/Documents/CodeEditTextViewExampleDocument.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct CodeEditTextViewExampleDocument: FileDocument {
2525
guard let data = configuration.file.regularFileContents else {
2626
throw CocoaError(.fileReadCorruptFile)
2727
}
28-
text = String(decoding: data, as: UTF8.self)
28+
text = String(bytes: data, encoding: .utf8)
2929
}
3030

3131
func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {

Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ extension TextView {
4343
/// - range: The range to scroll to.
4444
/// - center: A flag that determines if the range should be centered in the view. Defaults to `true`.
4545
///
46-
/// If `center` is `true`, the range will be centered in the visible area. If `center` is `false`, the range will be aligned at the top-left of the view.
46+
/// If `center` is `true`, the range will be centered in the visible area.
47+
/// If `center` is `false`, the range will be aligned at the top-left of the view.
4748
public func scrollToRange(_ range: NSRange, center: Bool = true) {
4849
guard let scrollView else { return }
4950

0 commit comments

Comments
 (0)