From dffb5e9f15d88d4f7431fa9a17f90055d263de5c Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Wed, 8 Nov 2023 08:48:20 -0600 Subject: [PATCH] macos: ensure tab labels are always visible This tells AppKit to give the tab labels higher priority than the tab titles. When the tabs become small, this causes the tab title text to be truncated instead of dropping the tab label. Fixes: https://github.com/mitchellh/ghostty/issues/843 --- macos/Sources/Features/Terminal/TerminalController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index 3355fef2d..000cd6e65 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -90,6 +90,7 @@ class TerminalController: NSWindowController, NSWindowDelegate, ] let attributedString = NSAttributedString(string: " \(equiv) ", attributes: attributes) let text = NSTextField(labelWithAttributedString: attributedString) + text.setContentCompressionResistancePriority(.windowSizeStayPut, for: .horizontal) window.tab.accessoryView = text } }