diff options
author | 2019-05-13 20:10:23 +0000 | |
---|---|---|
committer | 2019-05-13 20:10:23 +0000 | |
commit | d37269ef36fa6f867093ec825e7013d703d7e218 (patch) | |
tree | fe5b00ca4e52ecd24a8c376479f4eb0a9e1e9936 /usr.bin/tmux/attributes.c | |
parent | Always include Lock in the menu. (diff) | |
download | wireguard-openbsd-d37269ef36fa6f867093ec825e7013d703d7e218.tar.xz wireguard-openbsd-d37269ef36fa6f867093ec825e7013d703d7e218.zip |
Add support for overline (SGR 53), from Ricardo Banffy.
Diffstat (limited to 'usr.bin/tmux/attributes.c')
-rw-r--r-- | usr.bin/tmux/attributes.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/attributes.c b/usr.bin/tmux/attributes.c index ec47e8d2672..39a24e17751 100644 --- a/usr.bin/tmux/attributes.c +++ b/usr.bin/tmux/attributes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: attributes.c,v 1.8 2018/10/18 07:57:57 nicm Exp $ */ +/* $OpenBSD: attributes.c,v 1.9 2019/05/13 20:10:23 nicm Exp $ */ /* * Copyright (c) 2009 Joshua Elsasser <josh@elsasser.org> @@ -31,7 +31,7 @@ attributes_tostring(int attr) if (attr == 0) return ("none"); - len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s%s%s%s%s%s", + len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s%s%s%s%s%s%s", (attr & GRID_ATTR_BRIGHT) ? "bright," : "", (attr & GRID_ATTR_DIM) ? "dim," : "", (attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "", @@ -43,7 +43,8 @@ attributes_tostring(int attr) (attr & GRID_ATTR_UNDERSCORE_2) ? "double-underscore," : "", (attr & GRID_ATTR_UNDERSCORE_3) ? "curly-underscore," : "", (attr & GRID_ATTR_UNDERSCORE_4) ? "dotted-underscore," : "", - (attr & GRID_ATTR_UNDERSCORE_5) ? "dashed-underscore," : ""); + (attr & GRID_ATTR_UNDERSCORE_5) ? "dashed-underscore," : "", + (attr & GRID_ATTR_OVERLINE) ? "overline," : ""); if (len > 0) buf[len - 1] = '\0'; @@ -73,7 +74,8 @@ attributes_fromstring(const char *str) { "double-underscore", GRID_ATTR_UNDERSCORE_2 }, { "curly-underscore", GRID_ATTR_UNDERSCORE_3 }, { "dotted-underscore", GRID_ATTR_UNDERSCORE_4 }, - { "dashed-underscore", GRID_ATTR_UNDERSCORE_5 } + { "dashed-underscore", GRID_ATTR_UNDERSCORE_5 }, + { "overline", GRID_ATTR_OVERLINE } }; if (*str == '\0' || strcspn(str, delimiters) == 0) |