File tree Expand file tree Collapse file tree
Sources/CodeEditSourceEditor/Gutter/LineFolding Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,20 @@ import AppKit
99import CodeEditTextView
1010
1111extension FoldingRibbonView {
12+ /// The context in which the fold is being drawn, including the depth and fold range.
13+ struct FoldMarkerDrawingContext {
14+ let range : ClosedRange < Int >
15+ let depth : UInt
16+
17+ /// Increment the depth
18+ func incrementDepth( ) -> FoldMarkerDrawingContext {
19+ FoldMarkerDrawingContext (
20+ range: range,
21+ depth: depth + 1
22+ )
23+ }
24+ }
25+
1226 override func draw( _ dirtyRect: NSRect ) {
1327 guard let context = NSGraphicsContext . current? . cgContext,
1428 let layoutManager = model. textView? . layoutManager else {
Original file line number Diff line number Diff line change @@ -158,18 +158,4 @@ class FoldingRibbonView: NSView {
158158 hoverAnimationProgress = 0.0
159159 hoveringFold = nil
160160 }
161-
162- /// The context in which the fold is being drawn, including the depth and fold range.
163- struct FoldMarkerDrawingContext {
164- let range : ClosedRange < Int >
165- let depth : UInt
166-
167- /// Increment the depth
168- func incrementDepth( ) -> FoldMarkerDrawingContext {
169- FoldMarkerDrawingContext (
170- range: range,
171- depth: depth + 1
172- )
173- }
174- }
175161}
You can’t perform that action at this time.
0 commit comments