macOS: Syntax highlighter: Swift can bridge c strings automatically
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -143,7 +143,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
.font: defaultFont
|
.font: defaultFont
|
||||||
]
|
]
|
||||||
backingStore.setAttributes(defaultAttributes, range: fullTextRange)
|
backingStore.setAttributes(defaultAttributes, range: fullTextRange)
|
||||||
var spans = highlight_config(backingStore.string.cString(using: String.Encoding.utf8))!
|
var spans = highlight_config(backingStore.string)!
|
||||||
evaluateExcludePrivateIPs(highlightSpans: spans)
|
evaluateExcludePrivateIPs(highlightSpans: spans)
|
||||||
|
|
||||||
while spans.pointee.type != HighlightEnd {
|
while spans.pointee.type != HighlightEnd {
|
||||||
|
|||||||
Reference in New Issue
Block a user