macOS: Make color theme use a dict
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -103,7 +103,7 @@ class ConfTextStorage: NSTextStorage {
|
||||
let range = NSRange(location: span.start, length: span.len)
|
||||
backingStore.setAttributes(nonColorAttributes(for: span.type), range: range)
|
||||
if let textColorTheme = textColorTheme {
|
||||
let color = textColorTheme.color(for: span.type)
|
||||
let color = textColorTheme.colorMap[span.type.rawValue] ?? textColorTheme.defaultColor
|
||||
backingStore.addAttribute(.foregroundColor, value: color, range: range)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user