Skip to content

Commit bb31db4

Browse files
committed
Fixed an issue with updating reformatAtColumn.
1 parent 4b15a77 commit bb31db4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/CodeEditSourceEditor/Controller/TextViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ public class TextViewController: NSViewController {
237237
/// The column at which to show the reformatting guide
238238
public var reformatAtColumn: Int = 80 {
239239
didSet {
240-
if let guideView = textView.subviews.first(
241-
where: { $0 is ReformattingGuideView }
242-
) as? ReformattingGuideView {
240+
if let guideView = self.guideView {
243241
guideView.setColumn(reformatAtColumn)
242+
guideView.updatePosition(in: textView)
243+
guideView.needsDisplay = true
244244
}
245245
}
246246
}

0 commit comments

Comments
 (0)