mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Add an attribute for ACS.
This commit is contained in:
parent
106e5d07be
commit
1a612a5936
@ -31,7 +31,8 @@ attributes_tostring(int attr)
|
|||||||
if (attr == 0)
|
if (attr == 0)
|
||||||
return ("none");
|
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_BRIGHT) ? "bright," : "",
|
||||||
(attr & GRID_ATTR_DIM) ? "dim," : "",
|
(attr & GRID_ATTR_DIM) ? "dim," : "",
|
||||||
(attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "",
|
(attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "",
|
||||||
@ -62,6 +63,7 @@ attributes_fromstring(const char *str)
|
|||||||
const char *name;
|
const char *name;
|
||||||
int attr;
|
int attr;
|
||||||
} table[] = {
|
} table[] = {
|
||||||
|
{ "acs", GRID_ATTR_CHARSET },
|
||||||
{ "bright", GRID_ATTR_BRIGHT },
|
{ "bright", GRID_ATTR_BRIGHT },
|
||||||
{ "bold", GRID_ATTR_BRIGHT },
|
{ "bold", GRID_ATTR_BRIGHT },
|
||||||
{ "dim", GRID_ATTR_DIM },
|
{ "dim", GRID_ATTR_DIM },
|
||||||
|
4
style.c
4
style.c
@ -26,7 +26,7 @@
|
|||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
/* Mask for bits not included in style. */
|
/* Mask for bits not included in style. */
|
||||||
#define STYLE_ATTR_MASK (~GRID_ATTR_CHARSET)
|
#define STYLE_ATTR_MASK (~0)
|
||||||
|
|
||||||
/* Default style. */
|
/* Default style. */
|
||||||
static struct style style_default = {
|
static struct style style_default = {
|
||||||
@ -247,7 +247,7 @@ style_tostring(struct style *sy)
|
|||||||
colour_tostring(gc->bg));
|
colour_tostring(gc->bg));
|
||||||
comma = ",";
|
comma = ",";
|
||||||
}
|
}
|
||||||
if (gc->attr != 0 && gc->attr != GRID_ATTR_CHARSET) {
|
if (gc->attr != 0) {
|
||||||
xsnprintf(s + off, sizeof s - off, "%s%s", comma,
|
xsnprintf(s + off, sizeof s - off, "%s%s", comma,
|
||||||
attributes_tostring(gc->attr));
|
attributes_tostring(gc->attr));
|
||||||
comma = ",";
|
comma = ",";
|
||||||
|
5
tmux.1
5
tmux.1
@ -4661,7 +4661,8 @@ for the terminal default colour; or a hexadecimal RGB string such as
|
|||||||
Set the background colour.
|
Set the background colour.
|
||||||
.It Ic none
|
.It Ic none
|
||||||
Set no attributes (turn off any active attributes).
|
Set no attributes (turn off any active attributes).
|
||||||
.It Xo Ic bright
|
.It Xo Ic acs ,
|
||||||
|
.Ic bright
|
||||||
(or
|
(or
|
||||||
.Ic bold ) ,
|
.Ic bold ) ,
|
||||||
.Ic dim ,
|
.Ic dim ,
|
||||||
@ -4681,6 +4682,8 @@ Set an attribute.
|
|||||||
Any of the attributes may be prefixed with
|
Any of the attributes may be prefixed with
|
||||||
.Ql no
|
.Ql no
|
||||||
to unset.
|
to unset.
|
||||||
|
.Ic acs
|
||||||
|
is the terminal alternate character set.
|
||||||
.It Xo Ic align=left
|
.It Xo Ic align=left
|
||||||
(or
|
(or
|
||||||
.Ic noalign ) ,
|
.Ic noalign ) ,
|
||||||
|
Loading…
Reference in New Issue
Block a user