mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-03 21:00:27 +00:00
20 lines
466 B
Swift
20 lines
466 B
Swift
import AppKit
|
|
|
|
/// Convenience interface for working with pasteboard strings.
|
|
extension NSPasteboard {
|
|
@MainActor static let find = NSPasteboard(name: .find)
|
|
|
|
/// The pasteboard's current string value.
|
|
@MainActor var string: String? {
|
|
get {
|
|
string(forType: .string)
|
|
}
|
|
set {
|
|
clearContents()
|
|
if let newValue {
|
|
setString(newValue, forType: .string)
|
|
}
|
|
}
|
|
}
|
|
}
|