macOS: Better highlighter default value and move c implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -101,7 +101,7 @@ class ConfTextStorage: NSTextStorage {
|
||||
|
||||
let range = NSRange(location: span.start, length: span.len)
|
||||
backingStore.setAttributes(nonColorAttributes(for: span.type), range: range)
|
||||
let color = textColorTheme.colorMap[span.type.rawValue] ?? textColorTheme.defaultColor
|
||||
let color = textColorTheme.colorMap[span.type.rawValue, default: textColorTheme.defaultColor]
|
||||
backingStore.addAttribute(.foregroundColor, value: color, range: range)
|
||||
|
||||
if span.type == HighlightError {
|
||||
|
||||
Reference in New Issue
Block a user