1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 15:25:14 +03:00

Use effective foreground/background from defaultAttrs to correctly take into account reverted background (mostly under cursor)

This commit is contained in:
Johann Rudloff 2020-04-19 16:43:12 +02:00
parent bcb894acc9
commit 1deb2a424e

View File

@ -76,8 +76,8 @@ public struct CellAttributes: CustomStringConvertible, Equatable {
public func replacingDefaults(with defaultAttributes: CellAttributes) -> CellAttributes {
var result = self
if self.foreground == -1 { result.foreground = defaultAttributes.foreground }
if self.background == -1 { result.background = defaultAttributes.background }
if self.foreground == -1 { result.foreground = defaultAttributes.effectiveForeground }
if self.background == -1 { result.background = defaultAttributes.effectiveBackground }
if self.special == -1 { result.special = defaultAttributes.special }
return result