Skip to content

Commit

Permalink
update size after layout
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyzanowskim committed Jan 9, 2025
1 parent 57a462a commit a85d9ed
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ extension STTextView: NSTextViewportLayoutControllerDelegate {
contentView.subviews.removeAll {
type(of: $0) != STInsertionPointView.self
}

sizeToFit()
}

public func textViewportLayoutController(_ textViewportLayoutController: NSTextViewportLayoutController, configureRenderingSurfaceFor textLayoutFragment: NSTextLayoutFragment) {
Expand Down Expand Up @@ -73,6 +71,7 @@ extension STTextView: NSTextViewportLayoutControllerDelegate {
}

public func textViewportLayoutControllerDidLayout(_ textViewportLayoutController: NSTextViewportLayoutController) {
sizeToFit()
updateSelectedRangeHighlight()
layoutGutter()
updateSelectedLineHighlight()
Expand Down

0 comments on commit a85d9ed

Please sign in to comment.