1
1
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:
Tae Won Ha 2016-10-24 23:03:58 +02:00
parent 91bca0f556
commit e61e14a8d2
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -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)))"