macOS: Better highlighter default value and move c implementation

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2019-01-21 22:22:20 +01:00
parent d7a88300f6
commit e1198b6e08
4 changed files with 3 additions and 3 deletions
@@ -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 {