diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 14:13:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 14:13:38 +0000 |
commit | 8cdc20ee7304c054419f4ecfae8237a16dbc797d (patch) | |
tree | 3d12b16688e0c67e8d273c2a153e2a58957ff0ba /usr.bin/tmux | |
parent | 565144c4220108a293dac7b85b2bdc71b277e872 (diff) |
Add an attribute for ACS.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/attributes.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/style.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 7 |
3 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/tmux/attributes.c b/usr.bin/tmux/attributes.c index 014fe10e8b7..1eee1c62563 100644 --- a/usr.bin/tmux/attributes.c +++ b/usr.bin/tmux/attributes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: attributes.c,v 1.10 2019/12/03 10:47:22 nicm Exp $ */ +/* $OpenBSD: attributes.c,v 1.11 2020/05/16 14:13:37 nicm Exp $ */ /* * Copyright (c) 2009 Joshua Elsasser <josh@elsasser.org> @@ -31,7 +31,8 @@ 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%s", + len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + (attr & GRID_ATTR_CHARSET) ? "acs," : "", (attr & GRID_ATTR_BRIGHT) ? "bright," : "", (attr & GRID_ATTR_DIM) ? "dim," : "", (attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "", @@ -62,6 +63,7 @@ attributes_fromstring(const char *str) const char *name; int attr; } table[] = { + { "acs", GRID_ATTR_CHARSET }, { "bright", GRID_ATTR_BRIGHT }, { "bold", GRID_ATTR_BRIGHT }, { "dim", GRID_ATTR_DIM }, diff --git a/usr.bin/tmux/style.c b/usr.bin/tmux/style.c index e3680d21e33..02da7c613b5 100644 --- a/usr.bin/tmux/style.c +++ b/usr.bin/tmux/style.c @@ -1,4 +1,4 @@ -/* $OpenBSD: style.c,v 1.24 2019/09/15 21:42:57 nicm Exp $ */ +/* $OpenBSD: style.c,v 1.25 2020/05/16 14:13:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -26,7 +26,7 @@ #include "tmux.h" /* Mask for bits not included in style. */ -#define STYLE_ATTR_MASK (~GRID_ATTR_CHARSET) +#define STYLE_ATTR_MASK (~0) /* Default style. */ static struct style style_default = { @@ -247,7 +247,7 @@ style_tostring(struct style *sy) colour_tostring(gc->bg)); comma = ","; } - if (gc->attr != 0 && gc->attr != GRID_ATTR_CHARSET) { + if (gc->attr != 0) { xsnprintf(s + off, sizeof s - off, "%s%s", comma, attributes_tostring(gc->attr)); comma = ","; diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 97d4d536997..439fc10218b 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.751 2020/05/16 14:10:29 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.752 2020/05/16 14:13:37 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> .\" @@ -4661,7 +4661,8 @@ for the terminal default colour; or a hexadecimal RGB string such as Set the background colour. .It Ic none Set no attributes (turn off any active attributes). -.It Xo Ic bright +.It Xo Ic acs , +.Ic bright (or .Ic bold ) , .Ic dim , @@ -4681,6 +4682,8 @@ Set an attribute. Any of the attributes may be prefixed with .Ql no to unset. +.Ic acs +is the terminal alternate character set. .It Xo Ic align=left (or .Ic noalign ) , |