Skip to content

Commit

Permalink
Restore resizing view after scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Jul 3, 2019
1 parent 0372ecf commit 227eb55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CotEditor/Sources/NSTextView+Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ extension NSTextView {
// reset minimum size for unwrap mode
self.minSize = self.visibleRect.size

// update view size
// -> For in case the view becomes bigger than text content width when pinch out
// but doesn't strech enough to the right edge of the scroll view.
self.sizeToFit()

self.didChangeValue(for: \.scale)

self.setNeedsDisplay(self.visibleRect)
Expand Down

0 comments on commit 227eb55

Please sign in to comment.