summaryrefslogtreecommitdiff
path: root/src/face.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-04-10 20:35:23 +1000
committerMaxime Coste <mawww@kakoune.org>2018-04-10 20:35:23 +1000
commitd846400279a1831d3d29a4dd179fbf799b4ee541 (patch)
tree8b09c915dd8762758b6faadbff153091165b4c93 /src/face.hh
parent9c82f6586cde0ac1111a1e96a705fb624e79a564 (diff)
Redraw window when the face definition changed
Hash the current face state and store that hash to check for changes.
Diffstat (limited to 'src/face.hh')
-rw-r--r--src/face.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/face.hh b/src/face.hh
index dc38192c..098664d7 100644
--- a/src/face.hh
+++ b/src/face.hh
@@ -44,6 +44,11 @@ constexpr bool operator!=(const Face& lhs, const Face& rhs)
return not (lhs == rhs);
}
+constexpr size_t hash_value(const Face& val)
+{
+ return hash_values(val.fg, val.bg, val.attributes);
+}
+
constexpr Face merge_faces(const Face& base, const Face& face)
{
return face.attributes & Attribute::Exclusive ?