Disable whitespace-trimming

This commit is contained in:
Damiano Galassi committed 2017-10-20 09:25:38 +02:00
1 parent fe178c9375
commit 0ce6c0a012
1 file changed
+5
@@ -160,6 +160,11 @@ class MetadataPrefsViewController : NSViewController, NSTableViewDelegate, NSTok
}
}
func tokenField(_ tokenField: NSTokenField, representedObjectForEditing editingString: String) -> Any? {
// Disable whitespace-trimming
return editingString
}
func tokenField(_ tokenField: NSTokenField, completionsForSubstring substring: String, indexOfToken tokenIndex: Int, indexOfSelectedItem selectedIndex: UnsafeMutablePointer<Int>?) -> [Any]? {
matches = currentTokens.filter { $0.hasPrefix(substring) }
return matches