fix(editor): source-editor spacing — blank lines are the separator (#71 follow-up 8)
Two defects from the flow-knob commit: (1) edit mode got reading-mode's paragraph spacing stacked on top of the visible blank source lines — gaps tripled. Source editors render the blank line AS the separator; paragraph spacing is now 0, only lineHeightMultiple rides the knobs. (2) Knob changes never reached an open editor — updateNSView now re-attributes the whole storage (selection preserved) when ProseTypography.flowKey moves.
This commit is contained in:
1 parent
6d7d1411a2
commit
677dc8c073
3 files changed
+22
-7
No files matched your search
@@ -108,6 +108,12 @@ nonisolated enum ProseTypography {
|
||||
clamped("proseHeadingSpacingLines", default: defaultHeadingSpacingLines, 0 ... 6)
|
||||
}
|
||||
|
||||
/// Every value the prose surfaces render from, summed — a change key
|
||||
/// for live re-attribution when settings move.
|
||||
static var flowKey: String {
|
||||
"\(bodyFont.fontName)@\(bodyFont.pointSize)|\(codeFont.fontName)@\(codeFont.pointSize)|\(headingFont.fontName)@\(headingFont.pointSize)|lh=\(lineHeightMultiple)|p=\(paragraphSpacingLines)|h=\(headingSpacingLines)"
|
||||
}
|
||||
|
||||
/// One body line at the configured flow, in points.
|
||||
static var linePoints: CGFloat {
|
||||
let f = bodyFont
|
||||
|
||||
Reference in new issue
Block a user