sync
This commit is contained in:
parent
ae25582c29
commit
3751effe59
23 changed files with 241 additions and 101 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: screen.c,v 1.81 2022/06/30 09:55:53 nicm Exp $ */
|
||||
/* $OpenBSD: screen.c,v 1.82 2023/06/26 08:14:19 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
|
@ -626,7 +626,7 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor)
|
|||
* before copying back.
|
||||
*/
|
||||
if (s->saved_grid != NULL)
|
||||
screen_resize(s, s->saved_grid->sx, s->saved_grid->sy, 1);
|
||||
screen_resize(s, s->saved_grid->sx, s->saved_grid->sy, 0);
|
||||
|
||||
/*
|
||||
* Restore the cursor position and cell. This happens even if not
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: style.c,v 1.31 2022/06/30 09:55:53 nicm Exp $ */
|
||||
/* $OpenBSD: style.c,v 1.32 2023/06/26 07:17:40 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
|
@ -77,6 +77,7 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
|
|||
if (strcasecmp(tmp, "default") == 0) {
|
||||
sy->gc.fg = base->fg;
|
||||
sy->gc.bg = base->bg;
|
||||
sy->gc.us = base->us;
|
||||
sy->gc.attr = base->attr;
|
||||
sy->gc.flags = base->flags;
|
||||
} else if (strcasecmp(tmp, "ignore") == 0)
|
||||
|
@ -162,6 +163,13 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
|
|||
sy->gc.bg = base->bg;
|
||||
} else
|
||||
goto error;
|
||||
} else if (end > 3 && strncasecmp(tmp, "us=", 3) == 0) {
|
||||
if ((value = colour_fromstring(tmp + 3)) == -1)
|
||||
goto error;
|
||||
if (value != 8)
|
||||
sy->gc.us = value;
|
||||
else
|
||||
sy->gc.us = base->us;
|
||||
} else if (strcasecmp(tmp, "none") == 0)
|
||||
sy->gc.attr = 0;
|
||||
else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
|
||||
|
@ -258,6 +266,11 @@ style_tostring(struct style *sy)
|
|||
colour_tostring(gc->bg));
|
||||
comma = ",";
|
||||
}
|
||||
if (gc->us != 8) {
|
||||
off += xsnprintf(s + off, sizeof s - off, "%sus=%s", comma,
|
||||
colour_tostring(gc->us));
|
||||
comma = ",";
|
||||
}
|
||||
if (gc->attr != 0) {
|
||||
xsnprintf(s + off, sizeof s - off, "%s%s", comma,
|
||||
attributes_tostring(gc->attr));
|
||||
|
@ -287,6 +300,8 @@ style_add(struct grid_cell *gc, struct options *oo, const char *name,
|
|||
gc->fg = sy->gc.fg;
|
||||
if (sy->gc.bg != 8)
|
||||
gc->bg = sy->gc.bg;
|
||||
if (sy->gc.us != 8)
|
||||
gc->us = sy->gc.us;
|
||||
gc->attr |= sy->gc.attr;
|
||||
|
||||
if (ft0 != NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $OpenBSD: tmux.1,v 1.920 2023/05/19 07:46:34 nicm Exp $
|
||||
.\" $OpenBSD: tmux.1,v 1.921 2023/06/26 07:17:40 nicm Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
.\"
|
||||
|
@ -14,7 +14,7 @@
|
|||
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: May 19 2023 $
|
||||
.Dd $Mdocdate: June 26 2023 $
|
||||
.Dt TMUX 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -5384,6 +5384,8 @@ for the terminal default colour; or a hexadecimal RGB string such as
|
|||
.Ql #ffffff .
|
||||
.It Ic bg=colour
|
||||
Set the background colour.
|
||||
.It Ic us=colour
|
||||
Set the underscore colour.
|
||||
.It Ic none
|
||||
Set no attributes (turn off any active attributes).
|
||||
.It Xo Ic acs ,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: tty.c,v 1.430 2023/04/25 09:31:50 nicm Exp $ */
|
||||
/* $OpenBSD: tty.c,v 1.431 2023/06/26 07:17:40 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
|
@ -483,6 +483,12 @@ tty_update_features(struct tty *tty)
|
|||
if (tty->term->flags & TERM_VT100LIKE)
|
||||
tty_puts(tty, "\033[?7727h");
|
||||
|
||||
/*
|
||||
* Features might have changed since the first draw during attach. For
|
||||
* example, this happens when DA responses are received.
|
||||
*/
|
||||
server_redraw_client(c);
|
||||
|
||||
tty_invalidate(tty);
|
||||
}
|
||||
|
||||
|
@ -2808,9 +2814,10 @@ tty_check_us(__unused struct tty *tty, struct colour_palette *palette,
|
|||
gc->us = c;
|
||||
}
|
||||
|
||||
/* Underscore colour is set as RGB so convert a 256 colour to RGB. */
|
||||
if (gc->us & COLOUR_FLAG_256)
|
||||
gc->us = colour_256toRGB (gc->us);
|
||||
/* Underscore colour is set as RGB so convert. */
|
||||
gc->us = colour_force_rgb (gc->us);
|
||||
if (gc->us == -1)
|
||||
gc->us = 8;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue