diff options
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift b/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift index cd91b01..eda5ee9 100644 --- a/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift +++ b/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift @@ -8,6 +8,7 @@ class ConfTextView: NSTextView { private let confTextStorage = ConfTextStorage() var hasError: Bool { return confTextStorage.hasError } + @objc dynamic var privateKeyString: String? override var string: String { didSet { @@ -51,6 +52,9 @@ extension ConfTextView: NSTextViewDelegate { func textDidChange(_ notification: Notification) { confTextStorage.highlightSyntax() + if privateKeyString != confTextStorage.privateKeyString { + privateKeyString = confTextStorage.privateKeyString + } needsDisplay = true } |