macOS: use the same default BellFeatures as config (#14049)

This commit is contained in:
Mitchell Hashimoto
2026-08-27 14:27:55 -07:00
committed by GitHub

View File

@@ -128,10 +128,10 @@ extension Ghostty {
/// due to the embedded library and Swift.
var bellFeatures: BellFeatures {
guard let config = self.config else { return .init() }
guard let config = self.config else { return .defaultValue }
var v: CUnsignedInt = 0
let key = "bell-features"
guard ghostty_config_get(config, &v, key, UInt(key.lengthOfBytes(using: .utf8))) else { return .init() }
guard ghostty_config_get(config, &v, key, UInt(key.lengthOfBytes(using: .utf8))) else { return .defaultValue }
return .init(rawValue: v)
}
@@ -810,6 +810,8 @@ extension Ghostty.Config {
static let attention = BellFeatures(rawValue: 1 << 2)
static let title = BellFeatures(rawValue: 1 << 3)
static let border = BellFeatures(rawValue: 1 << 4)
static let defaultValue = BellFeatures([.attention, .title])
}
struct SplitPreserveZoom: OptionSet {