Skip to content

Commit 8d30359

Browse files
yusufozgullukepistrol
authored andcommitted
Fix SwiftLint warnings
1 parent 8f813af commit 8d30359

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Sources/CodeEditTextView/STTextViewController.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ public class STTextViewController: NSViewController, STTextViewDelegate, ThemeAt
141141
self.cursorPositionCancellable = self.cursorPosition?.sink(receiveValue: { value in
142142
self.setCursorPosition(value)
143143
})
144-
145-
NotificationCenter.default.addObserver(forName: NSWindow.didResizeNotification, object: nil, queue: .main) { [weak self] _ in
146-
guard let self = self else { return }
147-
(self.view as? NSScrollView)?.contentView.contentInsets.bottom = self.bottomContentInsets
148-
}
149144
}
150145

151146
internal func setUpHighlighting() {
@@ -162,6 +157,13 @@ public class STTextViewController: NSViewController, STTextViewDelegate, ThemeAt
162157

163158
public override func viewDidLoad() {
164159
super.viewDidLoad()
160+
161+
NotificationCenter.default.addObserver(forName: NSWindow.didResizeNotification,
162+
object: nil,
163+
queue: .main) { [weak self] _ in
164+
guard let self = self else { return }
165+
(self.view as? NSScrollView)?.contentView.contentInsets.bottom = self.bottomContentInsets
166+
}
165167
}
166168

167169
public override func viewDidAppear() {

0 commit comments

Comments
 (0)