Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2013-06-13 18:12:49 +01:00
commit 06b5805479
5 changed files with 21 additions and 21 deletions

View File

@ -415,8 +415,8 @@ const struct options_table_entry session_options_table[] = {
.type = OPTIONS_TABLE_STRING,
.default_str = "*256col*:colors=256"
",xterm*:XT:Ms=\\E]52;%p1%s;%p2%s\\007"
":Cc=\\E]12;%p1%s\\007:Cr=\\E]112\\007"
":Cs=\\E[%p1%d q:Csr=\\E[2 q,screen*:XT"
":Cs=\\E]12;%p1%s\\007:Cr=\\E]112\\007"
":Ss=\\E[%p1%d q:Se=\\E[2 q,screen*:XT"
},
{ .name = "update-environment",

4
tmux.1
View File

@ -3575,7 +3575,7 @@ This command only works from outside
understands some extensions to
.Xr terminfo 5 :
.Bl -tag -width Ds
.It Em Cc , Cr
.It Em Cs , Cr
Set the cursor colour.
The first takes a single string argument and is used to set the colour;
the second takes no arguments and restores the default cursor colour.
@ -3585,7 +3585,7 @@ to change the cursor colour from inside
.Bd -literal -offset indent
$ printf '\e033]12;red\e033\e\e'
.Ed
.It Em Cs , Csr
.It Em \&Ss , Se
Change the cursor style.
If set, a sequence such as this may be used
to change the cursor to an underline:

6
tmux.h
View File

@ -249,15 +249,13 @@ enum tty_code_code {
TTYC_BEL, /* bell, bl */
TTYC_BLINK, /* enter_blink_mode, mb */
TTYC_BOLD, /* enter_bold_mode, md */
TTYC_CC, /* set colour cursor, Cc */
TTYC_CIVIS, /* cursor_invisible, vi */
TTYC_CLEAR, /* clear_screen, cl */
TTYC_CNORM, /* cursor_normal, ve */
TTYC_COLORS, /* max_colors, Co */
TTYC_CR, /* restore cursor colour, Cr */
TTYC_CS1, /* set cursor style, Cs */
TTYC_CS, /* set cursor colour, Cs */
TTYC_CSR, /* change_scroll_region, cs */
TTYC_CSR1, /* reset cursor style, Csr */
TTYC_CUB, /* parm_left_cursor, LE */
TTYC_CUB1, /* cursor_left, le */
TTYC_CUD, /* parm_down_cursor, DO */
@ -387,6 +385,7 @@ enum tty_code_code {
TTYC_RMACS, /* exit_alt_charset_mode */
TTYC_RMCUP, /* exit_ca_mode, te */
TTYC_RMKX, /* keypad_local, ke */
TTYC_SE, /* reset cursor style, Se */
TTYC_SETAB, /* set_a_background, AB */
TTYC_SETAF, /* set_a_foreground, AF */
TTYC_SGR0, /* exit_attribute_mode, me */
@ -396,6 +395,7 @@ enum tty_code_code {
TTYC_SMKX, /* keypad_xmit, ks */
TTYC_SMSO, /* enter_standout_mode, so */
TTYC_SMUL, /* enter_underline_mode, us */
TTYC_SS, /* set cursor style, Ss */
TTYC_TSL, /* to_status_line, tsl */
TTYC_VPA, /* row_address, cv */
TTYC_XENL, /* eat_newline_glitch, xn */

View File

@ -41,15 +41,13 @@ const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
{ TTYC_BEL, TTYCODE_STRING, "bel" },
{ TTYC_BLINK, TTYCODE_STRING, "blink" },
{ TTYC_BOLD, TTYCODE_STRING, "bold" },
{ TTYC_CC, TTYCODE_STRING, "Cc" },
{ TTYC_CIVIS, TTYCODE_STRING, "civis" },
{ TTYC_CLEAR, TTYCODE_STRING, "clear" },
{ TTYC_CNORM, TTYCODE_STRING, "cnorm" },
{ TTYC_COLORS, TTYCODE_NUMBER, "colors" },
{ TTYC_CR, TTYCODE_STRING, "Cr" },
{ TTYC_CS1, TTYCODE_STRING, "Cs" },
{ TTYC_CS, TTYCODE_STRING, "Cs" },
{ TTYC_CSR, TTYCODE_STRING, "csr" },
{ TTYC_CSR1, TTYCODE_STRING, "Csr" },
{ TTYC_CUB, TTYCODE_STRING, "cub" },
{ TTYC_CUB1, TTYCODE_STRING, "cub1" },
{ TTYC_CUD, TTYCODE_STRING, "cud" },
@ -179,6 +177,7 @@ const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
{ TTYC_RMACS, TTYCODE_STRING, "rmacs" },
{ TTYC_RMCUP, TTYCODE_STRING, "rmcup" },
{ TTYC_RMKX, TTYCODE_STRING, "rmkx" },
{ TTYC_SE, TTYCODE_STRING, "Se" },
{ TTYC_SETAB, TTYCODE_STRING, "setab" },
{ TTYC_SETAF, TTYCODE_STRING, "setaf" },
{ TTYC_SGR0, TTYCODE_STRING, "sgr0" },
@ -188,6 +187,7 @@ const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
{ TTYC_SMKX, TTYCODE_STRING, "smkx" },
{ TTYC_SMSO, TTYCODE_STRING, "smso" },
{ TTYC_SMUL, TTYCODE_STRING, "smul" },
{ TTYC_SS, TTYCODE_STRING, "Ss" },
{ TTYC_TSL, TTYCODE_STRING, "tsl" },
{ TTYC_VPA, TTYCODE_STRING, "vpa" },
{ TTYC_XENL, TTYCODE_FLAG, "xenl" },

22
tty.c
View File

@ -220,7 +220,7 @@ tty_start_tty(struct tty *tty)
tty_puts(tty, "\033[?1000l\033[?1006l\033[?1005l");
if (tty_term_has(tty->term, TTYC_XT))
tty_puts(tty, "\033[c\033[>4;1m\033[?1004h\033[m");
tty_puts(tty, "\033[c\033[>4;1m\033[m");
tty->cx = UINT_MAX;
tty->cy = UINT_MAX;
@ -270,11 +270,11 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, tty_term_string(tty->term, TTYC_SGR0));
tty_raw(tty, tty_term_string(tty->term, TTYC_RMKX));
tty_raw(tty, tty_term_string(tty->term, TTYC_CLEAR));
if (tty_term_has(tty->term, TTYC_CS1) && tty->cstyle != 0) {
if (tty_term_has(tty->term, TTYC_CSR1))
tty_raw(tty, tty_term_string(tty->term, TTYC_CSR1));
if (tty_term_has(tty->term, TTYC_SS) && tty->cstyle != 0) {
if (tty_term_has(tty->term, TTYC_SE))
tty_raw(tty, tty_term_string(tty->term, TTYC_SE));
else
tty_raw(tty, tty_term_string1(tty->term, TTYC_CS1, 0));
tty_raw(tty, tty_term_string1(tty->term, TTYC_SS, 0));
}
tty_raw(tty, tty_term_string(tty->term, TTYC_CR));
@ -283,7 +283,7 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, "\033[?1000l\033[?1006l\033[?1005l");
if (tty_term_has(tty->term, TTYC_XT))
tty_raw(tty, "\033[>4m\033[?1004l\033[m");
tty_raw(tty, "\033[>4m\033[m");
tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));
@ -455,7 +455,7 @@ tty_force_cursor_colour(struct tty *tty, const char *ccolour)
if (*ccolour == '\0')
tty_putcode(tty, TTYC_CR);
else
tty_putcode_ptr1(tty, TTYC_CC, ccolour);
tty_putcode_ptr1(tty, TTYC_CS, ccolour);
free(tty->ccolour);
tty->ccolour = xstrdup(ccolour);
}
@ -479,12 +479,12 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
tty_putcode(tty, TTYC_CIVIS);
}
if (tty->cstyle != s->cstyle) {
if (tty_term_has(tty->term, TTYC_CS1)) {
if (tty_term_has(tty->term, TTYC_SS)) {
if (s->cstyle == 0 &&
tty_term_has(tty->term, TTYC_CSR1))
tty_putcode(tty, TTYC_CSR1);
tty_term_has(tty->term, TTYC_SE))
tty_putcode(tty, TTYC_SE);
else
tty_putcode1(tty, TTYC_CS1, s->cstyle);
tty_putcode1(tty, TTYC_SS, s->cstyle);
}
tty->cstyle = s->cstyle;
}