macOS: use the same default BellFeatures as config

This commit is contained in:
Lukas
2026-08-27 23:17:17 +02:00
parent e9ad4b1d63
commit 572fd58377

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 {