summaryrefslogtreecommitdiff
path: root/src/face.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-08-23 12:13:14 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-08-23 12:13:14 +0100
commitdc504284c3b57c9af377012f0b955f9ae322a3eb (patch)
treea506e7a415263371eb40a82d34f24705bcc36584 /src/face.hh
parent504862fce72773d873e26b3fb8953e5c23a5e9a5 (diff)
Change flag lines highlighter to use faces instead of colors
Fixes #130
Diffstat (limited to 'src/face.hh')
-rw-r--r--src/face.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/face.hh b/src/face.hh
index b5891c89..e650cd81 100644
--- a/src/face.hh
+++ b/src/face.hh
@@ -42,6 +42,13 @@ constexpr bool operator!=(const Face& lhs, const Face& rhs)
return not (lhs == rhs);
}
+constexpr Face merge_faces(const Face& base, const Face& face)
+{
+ return { face.fg == Color::Default ? base.fg : face.fg,
+ face.bg == Color::Default ? base.bg : face.bg,
+ face.attributes | base.attributes };
+}
+
}
#endif // face_hh_INCLUDED