Skip to content

Commit af0059e

Browse files
committed
Remove Unused Variables
1 parent 933c7a2 commit af0059e

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

Example/CodeEditSourceEditorExample/CodeEditSourceEditorExample/Views/MockCompletionDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MockCompletionDelegate: CodeSuggestionDelegate, ObservableObject {
3535
try? await Task.sleep(for: .seconds(0.2))
3636
return (cursorPosition, [Suggestion(text: "Hello"), Suggestion(text: "World")])
3737
}
38-
38+
3939
func completionOnCursorMove(
4040
textView: TextViewController,
4141
cursorPosition: CursorPosition

Sources/CodeEditSourceEditor/CodeSuggestion/CodeSuggestionRowView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ final class CodeSuggestionRowView: NSTableRowView {
1515
self.getSelectionColor = getSelectionColor
1616
super.init(frame: .zero)
1717
}
18-
18+
1919
required init?(coder: NSCoder) {
2020
fatalError("init(coder:) has not been implemented")
2121
}
22-
22+
2323
override func drawSelection(in dirtyRect: NSRect) {
2424
guard isSelected else { return }
2525
guard let context = NSGraphicsContext.current?.cgContext else { return }

Sources/CodeEditSourceEditor/CodeSuggestion/SuggestionController.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,8 @@ public final class SuggestionController: NSWindowController {
8787
}
8888

8989
/// Opens the window as a child of another window.
90-
public func showWindow() {
91-
guard let window = window,
92-
let parentWindow = NSApplication.shared.keyWindow
93-
else { return }
94-
90+
public func showWindow(attachedTo parentWindow: NSWindow) {
91+
guard let window = window else { return }
9592
parentWindow.addChildWindow(window, ordered: .above)
9693

9794
// Close on window switch observer

Sources/CodeEditSourceEditor/Controller/TextViewController.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ public class TextViewController: NSViewController {
196196
)
197197
}
198198

199-
/// The `SuggestionController` lets us display the autocomplete items
200-
public lazy var suggestionController: SuggestionController = SuggestionController()
201-
202199
// MARK: Init
203200

204201
public init(

0 commit comments

Comments
 (0)