Skip to content

Commit 202a25d

Browse files
authored
Fixing Typos (#1579)
* Corrected a few typos
1 parent 7eece7a commit 202a25d

14 files changed

+51
-51
lines changed

CodeEdit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
611191FE2B08CCD200D4459B /* SearchIndexer+File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611191FD2B08CCD200D4459B /* SearchIndexer+File.swift */; };
262262
611192002B08CCD700D4459B /* SearchIndexer+Memory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611191FF2B08CCD700D4459B /* SearchIndexer+Memory.swift */; };
263263
611192022B08CCDC00D4459B /* SearchIndexer+Search.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611192012B08CCDC00D4459B /* SearchIndexer+Search.swift */; };
264-
611192042B08CCED00D4459B /* SearchIndexer+ProgressivSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611192032B08CCED00D4459B /* SearchIndexer+ProgressivSearch.swift */; };
264+
611192042B08CCED00D4459B /* SearchIndexer+ProgressiveSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611192032B08CCED00D4459B /* SearchIndexer+ProgressiveSearch.swift */; };
265265
611192062B08CCF600D4459B /* SearchIndexer+Add.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611192052B08CCF600D4459B /* SearchIndexer+Add.swift */; };
266266
611192082B08CCFD00D4459B /* SearchIndexer+Terms.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611192072B08CCFD00D4459B /* SearchIndexer+Terms.swift */; };
267267
6111920C2B08CD0B00D4459B /* SearchIndexer+InternalMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6111920B2B08CD0B00D4459B /* SearchIndexer+InternalMethods.swift */; };
@@ -800,7 +800,7 @@
800800
611191FD2B08CCD200D4459B /* SearchIndexer+File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+File.swift"; sourceTree = "<group>"; };
801801
611191FF2B08CCD700D4459B /* SearchIndexer+Memory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+Memory.swift"; sourceTree = "<group>"; };
802802
611192012B08CCDC00D4459B /* SearchIndexer+Search.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+Search.swift"; sourceTree = "<group>"; };
803-
611192032B08CCED00D4459B /* SearchIndexer+ProgressivSearch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+ProgressivSearch.swift"; sourceTree = "<group>"; };
803+
611192032B08CCED00D4459B /* SearchIndexer+ProgressiveSearch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+ProgressiveSearch.swift"; sourceTree = "<group>"; };
804804
611192052B08CCF600D4459B /* SearchIndexer+Add.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+Add.swift"; sourceTree = "<group>"; };
805805
611192072B08CCFD00D4459B /* SearchIndexer+Terms.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+Terms.swift"; sourceTree = "<group>"; };
806806
6111920B2B08CD0B00D4459B /* SearchIndexer+InternalMethods.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchIndexer+InternalMethods.swift"; sourceTree = "<group>"; };
@@ -2240,7 +2240,7 @@
22402240
611191FF2B08CCD700D4459B /* SearchIndexer+Memory.swift */,
22412241
611191FD2B08CCD200D4459B /* SearchIndexer+File.swift */,
22422242
611192012B08CCDC00D4459B /* SearchIndexer+Search.swift */,
2243-
611192032B08CCED00D4459B /* SearchIndexer+ProgressivSearch.swift */,
2243+
611192032B08CCED00D4459B /* SearchIndexer+ProgressiveSearch.swift */,
22442244
611192052B08CCF600D4459B /* SearchIndexer+Add.swift */,
22452245
611192072B08CCFD00D4459B /* SearchIndexer+Terms.swift */,
22462246
6111920B2B08CD0B00D4459B /* SearchIndexer+InternalMethods.swift */,
@@ -3217,7 +3217,7 @@
32173217
B6C4F2A62B3CABD200B2B140 /* HistoryInspectorItemView.swift in Sources */,
32183218
B65B10FE2B08B07D002852CF /* SourceControlNavigatorChangesList.swift in Sources */,
32193219
58F2EB03292FB2B0004A9BDE /* Documentation.docc in Sources */,
3220-
611192042B08CCED00D4459B /* SearchIndexer+ProgressivSearch.swift in Sources */,
3220+
611192042B08CCED00D4459B /* SearchIndexer+ProgressiveSearch.swift in Sources */,
32213221
611192022B08CCDC00D4459B /* SearchIndexer+Search.swift in Sources */,
32223222
04BA7C272AE2E9F100584E1C /* GitClient+Push.swift in Sources */,
32233223
2B7A583527E4BA0100D25D4E /* AppDelegate.swift in Sources */,

CodeEdit/Features/CodeEditUI/Views/CEContentUnavailableView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct CEContentUnavailableView<Actions: View>: View {
2525
self.actions = actions()
2626
}
2727

28-
var contentUnavaiableView: some View {
28+
var contentUnavailableView: some View {
2929
VStack(spacing: 14) {
3030
VStack(spacing: 5) {
3131
if systemImage != nil {
@@ -53,10 +53,10 @@ struct CEContentUnavailableView<Actions: View>: View {
5353

5454
var body: some View {
5555
if #available(macOS 14, *) {
56-
contentUnavaiableView
56+
contentUnavailableView
5757
.buttonStyle(.accessoryBarAction)
5858
} else {
59-
contentUnavaiableView
59+
contentUnavailableView
6060
}
6161
}
6262
}

CodeEdit/Features/CodeEditUI/Views/OverlayPanel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ final class OverlayPanel: NSPanel, NSWindowDelegate {
2121
}
2222

2323
override func standardWindowButton(_ button: NSWindow.ButtonType) -> NSButton? {
24-
let btn = super.standardWindowButton(button)
25-
btn?.isHidden = true
26-
return btn
24+
let button = super.standardWindowButton(button)
25+
button?.isHidden = true
26+
return button
2727
}
2828

2929
func windowDidResignKey(_ notification: Notification) {

CodeEdit/Features/CodeFile/CodeFileDocument.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ final class CodeFileDocument: NSDocument, ObservableObject, QLPreviewItem {
3232
/// Used to override detected languages.
3333
@Published var language: CodeLanguage?
3434

35-
/// Document-specific overriden indent option.
35+
/// Document-specific overridden indent option.
3636
@Published var indentOption: SettingsData.TextEditingSettings.IndentOption?
3737

38-
/// Document-specific overriden tab width.
38+
/// Document-specific overridden tab width.
3939
@Published var defaultTabWidth: Int?
4040

41-
/// Document-specific overriden line wrap preference.
41+
/// Document-specific overridden line wrap preference.
4242
@Published var wrapLines: Bool?
4343

4444
/*
@@ -133,7 +133,7 @@ final class CodeFileDocument: NSDocument, ObservableObject, QLPreviewItem {
133133
self.content = content
134134
}
135135

136-
/// Triggered when change occured
136+
/// Triggered when change occurred
137137
override func updateChangeCount(_ change: NSDocument.ChangeType) {
138138
super.updateChangeCount(change)
139139

CodeEdit/Features/Documents/Controllers/CodeEditWindowController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ final class CodeEditWindowController: NSWindowController, NSToolbarDelegate, Obs
128128
// style the toolbar background in native tab bar style.
129129
self.window?.titlebarSeparatorStyle = .none
130130
} else {
131-
// In xcode tab bar style, we use default toolbar background with
131+
// In Xcode tab bar style, we use default toolbar background with
132132
// line separator.
133133
self.window?.titlebarSeparatorStyle = .automatic
134134
}

CodeEdit/Features/Documents/Indexer/SearchIndexer+Add.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension SearchIndexer {
2121
return false
2222
}
2323

24-
return modifiyIndexQueue.sync {
24+
return modifyIndexQueue.sync {
2525
SKIndexAddDocumentWithText(index, document.takeUnretainedValue(), text as CFString, canReplace)
2626
}
2727
}
@@ -65,7 +65,7 @@ extension SearchIndexer {
6565
// Try to detect the mime type if it wasn't specified
6666
let mime = mimeType ?? self.detectMimeType(fileURL)
6767

68-
return modifiyIndexQueue.sync {
68+
return modifyIndexQueue.sync {
6969
SKIndexAddDocument(index, document.takeUnretainedValue(), mime as CFString?, canReplace)
7070
}
7171
}

CodeEdit/Features/Documents/Indexer/SearchIndexer+AsyncController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
extension SearchIndexer {
11-
/// Manager for SearchIndexer objct that supports async calls to the index
11+
/// Manager for SearchIndexer object that supports async calls to the index
1212
class AsyncManager {
1313
/// An instance of the SearchIndexer
1414
let index: SearchIndexer
@@ -44,7 +44,7 @@ extension SearchIndexer {
4444
/// - timeout: The timeout duration for each search operation. Default is 1.0 second.
4545
///
4646
/// - Returns: An asynchronous stream (`AsyncStream`) of search results in chunks.
47-
/// The search results are returned in the form of a `SearchIndexer.ProgressivSearch.Results` object.
47+
/// The search results are returned in the form of a `SearchIndexer.ProgressiveSearch.Results` object.
4848
///
4949
/// This function initiates a progressive search on the index for the specified query
5050
/// and asynchronously yields search results in chunks using an `AsyncStream`.
@@ -65,7 +65,7 @@ extension SearchIndexer {
6565
query: String,
6666
_ maxResults: Int,
6767
timeout: TimeInterval = 1.0
68-
) async -> AsyncStream<SearchIndexer.ProgressivSearch.Results> {
68+
) async -> AsyncStream<SearchIndexer.ProgressiveSearch.Results> {
6969
let search = index.progressiveSearch(query: query)
7070

7171
return AsyncStream { configuration in

CodeEdit/Features/Documents/Indexer/SearchIndexer+InternalMethods.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import Foundation
99
import UniformTypeIdentifiers
1010

1111
extension SearchIndexer {
12-
/// A "typealias" for a document ID, using a struct becasue swift lint doesn't allow typealiases for 3 types
12+
/// A "typealias" for a document ID, using a struct because swift lint doesn't allow type-aliases for 3 types
1313
public struct DocumentID {
1414
let url: URL
15-
let docuemnt: SKDocument
15+
let document: SKDocument
1616
let documentID: SKDocumentID
1717
}
1818
/// Returns the mime type for the url, or nil if the mime type couldn't be ascertained from the extension
@@ -21,8 +21,8 @@ extension SearchIndexer {
2121
/// - Returns: the mime type of the url if able to detect, nil otherwise
2222
func detectMimeType(_ url: URL) -> String? {
2323
if let type = UTType(filenameExtension: url.pathExtension) {
24-
if let mimetype = type.preferredMIMEType {
25-
return mimetype
24+
if let mimeType = type.preferredMIMEType {
25+
return mimeType
2626
}
2727
}
2828
return nil
@@ -33,7 +33,7 @@ extension SearchIndexer {
3333
/// i. e. the index does not need to get flushed.
3434
func remove(document: SKDocument) -> Bool {
3535
if let index = self.index {
36-
return modifiyIndexQueue.sync {
36+
return modifyIndexQueue.sync {
3737
SKIndexRemoveDocument(index, document)
3838
}
3939
}
@@ -78,7 +78,7 @@ extension SearchIndexer {
7878
docs.append(
7979
DocumentID(
8080
url: baseURL,
81-
docuemnt: inParentDocument!,
81+
document: inParentDocument!,
8282
documentID: documentID
8383
)
8484
)
@@ -88,8 +88,8 @@ extension SearchIndexer {
8888

8989
/// Return an array of all the documents contained within the index
9090
///
91-
/// - Parameter termState: the termstate of documents to be returned (eg. all, empty only, non-empty only)
92-
/// - Returns: An array containing all the documents matching the termstate
91+
/// - Parameter termState: the TermState of documents to be returned (eg. all, empty only, non-empty only)
92+
/// - Returns: An array containing all the documents matching the TermState
9393
func fullDocuments(termState: TermState = .all) -> [DocumentID] {
9494
guard let index = self.index else {
9595
return []

CodeEdit/Features/Documents/Indexer/SearchIndexer+Memory.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
import Foundation
99
extension SearchIndexer {
10-
/// Memory based indxing using NSMutable
10+
/// Memory based indexing using NSMutable
1111
public class Memory: SearchIndexer {
1212
// The data index store
1313
private var store = NSMutableData()
1414

15-
/// Creat a new in-memory index
15+
/// Create a new in-memory index
1616
/// - Parameter properties: the properties to use in the index
1717
public init?(properties: CreateProperties = CreateProperties()) {
1818
let data = NSMutableData()

CodeEdit/Features/Documents/Indexer/SearchIndexer+ProgressivSearch.swift renamed to CodeEdit/Features/Documents/Indexer/SearchIndexer+ProgressiveSearch.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// SearchIndexer+ProgressivSearch.swift
2+
// SearchIndexer+ProgressiveSearch.swift
33
// CodeEdit
44
//
55
// Created by Tommy Ludwig on 18.11.23.
@@ -8,12 +8,12 @@
88
import Foundation
99

1010
extension SearchIndexer {
11-
/// Object representaitng the search results
11+
/// Object representing the search results
1212
public class SearchResult {
1313
/// The identifying url for the document
1414
let url: URL
1515

16-
/// The search score for the codument result, Heigher means more relevant
16+
/// The search score for the document, higher means more relevant
1717
let score: Float
1818

1919
init(url: URL, score: Float) {
@@ -26,13 +26,13 @@ extension SearchIndexer {
2626
public func progressiveSearch(
2727
query: String,
2828
options: SKSearchOptions = SKSearchOptions(kSKSearchOptionDefault)
29-
) -> ProgressivSearch {
30-
return ProgressivSearch(options: options, index: self, query: query)
29+
) -> ProgressiveSearch {
30+
return ProgressiveSearch(options: options, index: self, query: query)
3131
}
3232

3333
/// A class for creating and managing a progressive search.
3434
/// A search starts on creation and can be cancelled at any time.
35-
public class ProgressivSearch {
35+
public class ProgressiveSearch {
3636
/// A class representing the results of a search request.
3737
public class Results {
3838
/// Create a search result
@@ -78,7 +78,7 @@ extension SearchIndexer {
7878
public func getNextSearchResultsChunk(
7979
limit: Int = 10,
8080
timeout: TimeInterval = 1.0
81-
) -> (ProgressivSearch.Results) {
81+
) -> (ProgressiveSearch.Results) {
8282
guard self.index.index != nil else {
8383
return Results(moreResultsAvailable: false, results: [])
8484
}

0 commit comments

Comments
 (0)