Skip to content

Commit 1b1235d

Browse files
committed
The dictation overlay now uses nativeForegroundColor, so it follows the terminal theme and foreground-color changes.
Follow up to the last PR.
1 parent 6b0de2e commit 1b1235d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/SwiftTerm/Mac/MacTerminalView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,8 +1739,8 @@ open class TerminalView: NSView, NSTextInputClient, NSUserInterfaceValidations,
17391739
para.maximumLineHeight = lineHeight
17401740
para.lineBreakMode = .byWordWrapping
17411741

1742-
// Use labelColor so the text flips correctly between light/dark mode,
1743-
// and otherwise render as plain terminal text.
1742+
// Match the terminal's effective foreground color. This preserves
1743+
// host-selected themes and terminal foreground-color changes.
17441744
//
17451745
// The terminal pixel-snaps each cell's width, so the effective per-cell
17461746
// advance is slightly wider than the font's natural advance. Apply a
@@ -1753,7 +1753,7 @@ open class TerminalView: NSView, NSTextInputClient, NSUserInterfaceValidations,
17531753
let fullRange = NSRange(location: 0, length: display.length)
17541754
display.addAttributes([
17551755
.font: font,
1756-
.foregroundColor: NSColor.labelColor,
1756+
.foregroundColor: nativeForegroundColor,
17571757
.paragraphStyle: para,
17581758
.kern: kern,
17591759
], range: fullRange)

0 commit comments

Comments
 (0)