mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-24 22:33:52 +03:00
Implement Equatable for CellAttributes
This commit is contained in:
parent
91bca0f556
commit
e61e14a8d2
@ -7,7 +7,7 @@ import Cocoa
|
||||
|
||||
// The definition can be found in NeoVimUiBridgeProtocol.h
|
||||
|
||||
func == (left: CellAttributes, right: CellAttributes) -> Bool {
|
||||
public func == (left: CellAttributes, right: CellAttributes) -> Bool {
|
||||
if left.foreground != right.foreground { return false }
|
||||
if left.fontTrait != right.fontTrait { return false }
|
||||
|
||||
@ -17,11 +17,7 @@ func == (left: CellAttributes, right: CellAttributes) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func != (left: CellAttributes, right: CellAttributes) -> Bool {
|
||||
return !(left == right)
|
||||
}
|
||||
|
||||
extension CellAttributes: CustomStringConvertible {
|
||||
extension CellAttributes: CustomStringConvertible, Equatable {
|
||||
|
||||
public var description: String {
|
||||
return "CellAttributes<fg: \(String(format: "%x", self.foreground)), bg: \(String(format: "%x", self.background)))"
|
||||
|
Loading…
Reference in New Issue
Block a user