summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-04-23 07:15:17 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-04-23 07:15:17 +0100
commit1a612a59361904a2996c8ca8b84e8c76548512b6 (patch)
treeb60a3f878508f49e38da9cdafbbfaab8d275f7c7
parent106e5d07beaacaa977372f8b6a0bcac5f981545b (diff)
Add an attribute for ACS.
-rw-r--r--attributes.c4
-rw-r--r--style.c4
-rw-r--r--tmux.15
3 files changed, 9 insertions, 4 deletions
diff --git a/attributes.c b/attributes.c
index ca88a056..b839f06d 100644
--- a/attributes.c
+++ b/attributes.c
@@ -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/style.c b/style.c
index 6ba4c524..da3b4c78 100644
--- a/style.c
+++ b/style.c
@@ -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/tmux.1 b/tmux.1
index e433aeae..d5320b15 100644
--- a/tmux.1
+++ b/tmux.1
@@ -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 ) ,