Skip to content

Commit 39e5ae3

Browse files
authored
Remove insets from scroll view (#27)
* Remove insets from scroll view * Tidy up code slightly
1 parent e421af2 commit 39e5ae3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/CodeEditTextView/TextView/TextView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,9 @@ public class TextView: NSView, NSTextContent {
463463
}
464464

465465
override public var visibleRect: NSRect {
466-
if let scrollView = scrollView {
466+
if let scrollView {
467467
var rect = scrollView.documentVisibleRect
468468
rect.origin.y += scrollView.contentInsets.top
469-
rect.size.height -= scrollView.contentInsets.top + scrollView.contentInsets.bottom
470469
return rect
471470
} else {
472471
return super.visibleRect

0 commit comments

Comments
 (0)