From fa6b0c99816679f81c25a7a12a377114d8523635 Mon Sep 17 00:00:00 2001 From: Noa Flaherty Date: Tue, 24 Feb 2026 16:01:34 -0500 Subject: [PATCH] fix(macos): use consistent paragraph style for placeholder height measurement Co-Authored-By: Claude --- .../macos/vellum-assistant/Features/Chat/ComposerView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/macos/vellum-assistant/Features/Chat/ComposerView.swift b/clients/macos/vellum-assistant/Features/Chat/ComposerView.swift index 492a91058c3..861942bc666 100644 --- a/clients/macos/vellum-assistant/Features/Chat/ComposerView.swift +++ b/clients/macos/vellum-assistant/Features/Chat/ComposerView.swift @@ -906,12 +906,14 @@ private final class CenteringClipView: NSClipView { let placeholder = textView.placeholderText, !placeholder.isEmpty { let font = textView.font ?? NSFont.systemFont(ofSize: 13) + let paragraph = NSMutableParagraphStyle() + paragraph.lineBreakMode = .byTruncatingTail let linePadding = textContainer.lineFragmentPadding let availableWidth = max(0, textView.bounds.width - textView.textContainerInset.width * 2 - linePadding * 2) let placeholderSize = (placeholder as NSString).boundingRect( with: NSSize(width: availableWidth, height: .greatestFiniteMagnitude), options: [.usesLineFragmentOrigin], - attributes: [.font: font] + attributes: [.font: font, .paragraphStyle: paragraph] ) usedHeight = max(usedHeight, placeholderSize.height) }