diff --git a/CodeEdit.xcodeproj/project.pbxproj b/CodeEdit.xcodeproj/project.pbxproj index 29cd7ec6b..caa5927e6 100644 --- a/CodeEdit.xcodeproj/project.pbxproj +++ b/CodeEdit.xcodeproj/project.pbxproj @@ -2218,7 +2218,6 @@ 588847672992AAB800996D95 /* Array */, 6CBD1BC42978DE3E006639D5 /* Text */, 5831E3D02934036D00D5A6D2 /* NSTableView */, - 6C48B5C82C0B5F7A001E9955 /* NSTextStorage */, 5831E3CA2933E86F00D5A6D2 /* View */, 5831E3C72933E7F700D5A6D2 /* Bundle */, 5831E3C62933E7E600D5A6D2 /* Color */, @@ -3799,7 +3798,6 @@ 6C81916729B3E80700B75C92 /* ModifierKeysObserver.swift in Sources */, 613899BC2B6E709C00A5CAF6 /* URL+FuzzySearchable.swift in Sources */, 611192002B08CCD700D4459B /* SearchIndexer+Memory.swift in Sources */, - 6C48B5C92C0B5F7A001E9955 /* NSTextStorage+isEmpty.swift in Sources */, 587B9E8129301D8F00AC7927 /* PublicKey.swift in Sources */, 611191FE2B08CCD200D4459B /* SearchIndexer+File.swift in Sources */, 77A01E302BB4270F00F0EA38 /* ProjectCEWorkspaceSettingsView.swift in Sources */, diff --git a/CodeEdit/Features/Documents/CodeFileDocument.swift b/CodeEdit/Features/Documents/CodeFileDocument.swift index 16ea9086e..79cbd176b 100644 --- a/CodeEdit/Features/Documents/CodeFileDocument.swift +++ b/CodeEdit/Features/Documents/CodeFileDocument.swift @@ -65,7 +65,7 @@ final class CodeFileDocument: NSDocument, ObservableObject { /// - Note: The UTType doesn't necessarily mean the file extension, it can be the MIME /// type or any other form of data representation. var utType: UTType? { - if content != nil && content?.isEmpty ?? true { + if content != nil { return .text } guard let fileType, let type = UTType(fileType) else { diff --git a/CodeEdit/Utils/Extensions/NSTextStorage/NSTextStorage+isEmpty.swift b/CodeEdit/Utils/Extensions/NSTextStorage/NSTextStorage+isEmpty.swift deleted file mode 100644 index f86705db6..000000000 --- a/CodeEdit/Utils/Extensions/NSTextStorage/NSTextStorage+isEmpty.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// NSTextStorage+isEmpty.swift -// CodeEdit -// -// Created by Khan Winter on 5/19/24. -// - -import AppKit - -extension NSTextStorage { - var isEmpty: Bool { - length == 0 - } -}