]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
ConfTextView: enable undo and disable junk
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 10 Jan 2019 10:15:40 +0000 (11:15 +0100)
committerRoopesh Chander <roop@roopc.net>
Mon, 14 Jan 2019 09:22:36 +0000 (14:52 +0530)
Double space stil makes a period, unfortunately.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuard/UI/macOS/View/ConfTextView.swift

index 4be292f64fc255a020d725b693dc64bb4730d500..954a1922f14713c1b1f21b64e90bda988953fd67 100644 (file)
@@ -23,6 +23,14 @@ class ConfTextView: NSTextView {
         confTextStorage.addLayoutManager(layoutManager)
         super.init(frame: CGRect(x: 0, y: 0, width: 1, height: 60), textContainer: textContainer)
         font = confTextStorage.defaultFont
+        allowsUndo = true
+        isAutomaticSpellingCorrectionEnabled = false
+        isAutomaticDataDetectionEnabled = false
+        isAutomaticLinkDetectionEnabled = false
+        isAutomaticTextCompletionEnabled = false
+        isAutomaticTextReplacementEnabled = false
+        isAutomaticDashSubstitutionEnabled = false
+        isAutomaticQuoteSubstitutionEnabled = false
         updateTheme()
         delegate = self
     }