mirror of
https://github.com/tmux/tmux.git
synced 2025-12-19 00:02:06 -05:00
Merge branch 'obsd-master'
This commit is contained in:
commit
194d0a0e25
@ -31,7 +31,7 @@ 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%s",
|
len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||||
(attr & GRID_ATTR_CHARSET) ? "acs," : "",
|
(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," : "",
|
||||||
@ -45,7 +45,8 @@ attributes_tostring(int attr)
|
|||||||
(attr & GRID_ATTR_UNDERSCORE_3) ? "curly-underscore," : "",
|
(attr & GRID_ATTR_UNDERSCORE_3) ? "curly-underscore," : "",
|
||||||
(attr & GRID_ATTR_UNDERSCORE_4) ? "dotted-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," : "");
|
(attr & GRID_ATTR_OVERLINE) ? "overline," : "",
|
||||||
|
(attr & GRID_ATTR_NOATTR) ? "noattr," : "");
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
buf[len - 1] = '\0';
|
buf[len - 1] = '\0';
|
||||||
|
|
||||||
|
|||||||
6
screen.c
6
screen.c
@ -594,8 +594,12 @@ screen_select_cell(struct screen *s, struct grid_cell *dst,
|
|||||||
if (COLOUR_DEFAULT(dst->bg))
|
if (COLOUR_DEFAULT(dst->bg))
|
||||||
dst->bg = src->bg;
|
dst->bg = src->bg;
|
||||||
utf8_copy(&dst->data, &src->data);
|
utf8_copy(&dst->data, &src->data);
|
||||||
dst->attr = src->attr;
|
|
||||||
dst->flags = src->flags;
|
dst->flags = src->flags;
|
||||||
|
|
||||||
|
if (dst->attr & GRID_ATTR_NOATTR)
|
||||||
|
dst->attr |= (src->attr & GRID_ATTR_CHARSET);
|
||||||
|
else
|
||||||
|
dst->attr |= src->attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reflow wrapped lines. */
|
/* Reflow wrapped lines. */
|
||||||
|
|||||||
@ -613,7 +613,8 @@ server_client_check_mouse_in_pane(struct window_pane *wp, u_int px, u_int py,
|
|||||||
line = wp->yoff + wp->sy;
|
line = wp->yoff + wp->sy;
|
||||||
|
|
||||||
/* Check if point is within the pane or scrollbar. */
|
/* Check if point is within the pane or scrollbar. */
|
||||||
if (((pane_status != PANE_STATUS_OFF && py != line) ||
|
if (((pane_status != PANE_STATUS_OFF &&
|
||||||
|
py != line && py != wp->yoff + wp->sy) ||
|
||||||
(wp->yoff == 0 && py < wp->sy) ||
|
(wp->yoff == 0 && py < wp->sy) ||
|
||||||
(py >= wp->yoff && py < wp->yoff + wp->sy)) &&
|
(py >= wp->yoff && py < wp->yoff + wp->sy)) &&
|
||||||
((sb_pos == PANE_SCROLLBARS_RIGHT &&
|
((sb_pos == PANE_SCROLLBARS_RIGHT &&
|
||||||
|
|||||||
7
style.c
7
style.c
@ -218,10 +218,13 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
|
|||||||
sy->gc.attr = 0;
|
sy->gc.attr = 0;
|
||||||
else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
|
else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
|
||||||
if (strcmp(tmp + 2, "attr") == 0)
|
if (strcmp(tmp + 2, "attr") == 0)
|
||||||
value = 0xffff & ~GRID_ATTR_CHARSET;
|
sy->gc.attr |= GRID_ATTR_NOATTR;
|
||||||
else if ((value = attributes_fromstring(tmp + 2)) == -1)
|
else {
|
||||||
|
value = attributes_fromstring(tmp + 2);
|
||||||
|
if (value == -1)
|
||||||
goto error;
|
goto error;
|
||||||
sy->gc.attr &= ~value;
|
sy->gc.attr &= ~value;
|
||||||
|
}
|
||||||
} else if (end > 6 && strncasecmp(tmp, "width=", 6) == 0) {
|
} else if (end > 6 && strncasecmp(tmp, "width=", 6) == 0) {
|
||||||
n = strtonum(tmp + 6, 0, UINT_MAX, &errstr);
|
n = strtonum(tmp + 6, 0, UINT_MAX, &errstr);
|
||||||
if (errstr != NULL)
|
if (errstr != NULL)
|
||||||
|
|||||||
1
tmux.h
1
tmux.h
@ -727,6 +727,7 @@ struct colour_palette {
|
|||||||
#define GRID_ATTR_UNDERSCORE_4 0x800
|
#define GRID_ATTR_UNDERSCORE_4 0x800
|
||||||
#define GRID_ATTR_UNDERSCORE_5 0x1000
|
#define GRID_ATTR_UNDERSCORE_5 0x1000
|
||||||
#define GRID_ATTR_OVERLINE 0x2000
|
#define GRID_ATTR_OVERLINE 0x2000
|
||||||
|
#define GRID_ATTR_NOATTR 0x4000
|
||||||
|
|
||||||
/* All underscore attributes. */
|
/* All underscore attributes. */
|
||||||
#define GRID_ATTR_ALL_UNDERSCORE \
|
#define GRID_ATTR_ALL_UNDERSCORE \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user