aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift')
-rw-r--r--WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift b/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift
index bf0f822..bc019f8 100644
--- a/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift
+++ b/WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift
@@ -7,7 +7,7 @@ class ConfTextView: NSTextView {
private let confTextStorage = ConfTextStorage()
- var hasError: Bool { return confTextStorage.hasError }
+ @objc dynamic var hasError: Bool = false
@objc dynamic var privateKeyString: String?
override var string: String {
@@ -58,6 +58,9 @@ extension ConfTextView: NSTextViewDelegate {
func textDidChange(_ notification: Notification) {
confTextStorage.highlightSyntax()
+ if hasError != confTextStorage.hasError {
+ hasError = confTextStorage.hasError
+ }
if privateKeyString != confTextStorage.privateKeyString {
privateKeyString = confTextStorage.privateKeyString
}