summaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-09-04 23:45:50 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-09-04 23:45:50 +0530
commit8b775dba2a886c5b2d0fadddafdf58c7c69d9cfb (patch)
treedc3dd17d7014084a16d844e9ca853990ca1b7f93 /st.h
parentdf482c4158e3579c8ab41d2851ea4cbb9b0057c7 (diff)
replacing ligatures+scrollback patch w +boxdraw and applying said patch(previous one gave errors even on manual patching w 0 errors)
Diffstat (limited to 'st.h')
-rw-r--r--st.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/st.h b/st.h
index 7185544..b5bf895 100644
--- a/st.h
+++ b/st.h
@@ -11,7 +11,8 @@
#define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d))
#define DEFAULT(a, b) (a) = (a) ? (a) : (b)
#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
-#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \
+#define ATTRCMP(a, b) (((a).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) != ((b).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) || \
+ (a).fg != (b).fg || \
(a).bg != (b).bg)
#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \
(t1.tv_nsec-t2.tv_nsec)/1E6)
@@ -34,6 +35,7 @@ enum glyph_attribute {
ATTR_WIDE = 1 << 9,
ATTR_WDUMMY = 1 << 10,
ATTR_BOXDRAW = 1 << 11,
+ ATTR_LIGA = 1 << 12,
ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
};