diff --git a/Sources/CodeEditTextView/TextView/TextView.swift b/Sources/CodeEditTextView/TextView/TextView.swift index 13b3a5b7..22af96c2 100644 --- a/Sources/CodeEditTextView/TextView/TextView.swift +++ b/Sources/CodeEditTextView/TextView/TextView.swift @@ -455,10 +455,9 @@ public class TextView: NSView, NSTextContent { } override public var visibleRect: NSRect { - if let scrollView = scrollView { + if let scrollView { var rect = scrollView.documentVisibleRect rect.origin.y += scrollView.contentInsets.top - rect.size.height -= scrollView.contentInsets.top + scrollView.contentInsets.bottom return rect } else { return super.visibleRect