backwards) screen CSI 34 h/l. From Guanpeng Xu.
-/* $OpenBSD: input.c,v 1.71 2014/10/08 17:35:58 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.72 2015/01/20 08:18:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
case 4: /* IRM */
screen_write_mode_clear(&ictx->ctx, MODE_INSERT);
break;
+ case 34:
+ screen_write_mode_set(&ictx->ctx, MODE_BLINKING);
+ break;
default:
log_debug("%s: unknown '%c'", __func__, ictx->ch);
break;
case 7: /* DECAWM */
screen_write_mode_clear(&ictx->ctx, MODE_WRAP);
break;
+ case 12:
+ screen_write_mode_clear(&ictx->ctx, MODE_BLINKING);
+ break;
case 25: /* TCEM */
screen_write_mode_clear(&ictx->ctx, MODE_CURSOR);
break;
case 4: /* IRM */
screen_write_mode_set(&ictx->ctx, MODE_INSERT);
break;
+ case 34:
+ screen_write_mode_clear(&ictx->ctx, MODE_BLINKING);
+ break;
default:
log_debug("%s: unknown '%c'", __func__, ictx->ch);
break;
case 7: /* DECAWM */
screen_write_mode_set(&ictx->ctx, MODE_WRAP);
break;
+ case 12:
+ screen_write_mode_set(&ictx->ctx, MODE_BLINKING);
+ break;
case 25: /* TCEM */
screen_write_mode_set(&ictx->ctx, MODE_CURSOR);
break;
-/* $OpenBSD: tmux.h,v 1.484 2014/12/09 19:23:35 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.485 2015/01/20 08:18:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
TTYC_CUP, /* cursor_address, cm */
TTYC_CUU, /* parm_up_cursor, UP */
TTYC_CUU1, /* cursor_up, up */
+ TTYC_CVVIS, /* cursor_visible, vs */
TTYC_DCH, /* parm_dch, DC */
TTYC_DCH1, /* delete_character, dc */
TTYC_DIM, /* enter_dim_mode, mh */
#define MODE_WRAP 0x10 /* whether lines wrap */
#define MODE_MOUSE_STANDARD 0x20
#define MODE_MOUSE_BUTTON 0x40
-/* 0x80 unused */
+#define MODE_BLINKING 0x80
#define MODE_MOUSE_UTF8 0x100
#define MODE_MOUSE_SGR 0x200
#define MODE_BRACKETPASTE 0x400
-/* $OpenBSD: tty-term.c,v 1.35 2014/07/21 10:25:48 nicm Exp $ */
+/* $OpenBSD: tty-term.c,v 1.36 2015/01/20 08:18:04 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
{ TTYC_CUP, TTYCODE_STRING, "cup" },
{ TTYC_CUU, TTYCODE_STRING, "cuu" },
{ TTYC_CUU1, TTYCODE_STRING, "cuu1" },
+ { TTYC_CVVIS, TTYCODE_STRING, "cvvis" },
{ TTYC_DCH, TTYCODE_STRING, "dch" },
{ TTYC_DCH1, TTYCODE_STRING, "dch1" },
{ TTYC_DIM, TTYCODE_STRING, "dim" },
-/* $OpenBSD: tty.c,v 1.170 2014/08/09 07:33:37 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.171 2015/01/20 08:18:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
mode &= ~MODE_CURSOR;
changed = mode ^ tty->mode;
- if (changed & MODE_CURSOR) {
- if (mode & MODE_CURSOR)
- tty_putcode(tty, TTYC_CNORM);
- else
+ if (changed & (MODE_CURSOR|MODE_BLINKING)) {
+ if (mode & MODE_CURSOR) {
+ if (mode & MODE_BLINKING &&
+ tty_term_has(tty->term, TTYC_CVVIS))
+ tty_putcode(tty, TTYC_CVVIS);
+ else
+ tty_putcode(tty, TTYC_CNORM);
+ } else
tty_putcode(tty, TTYC_CIVIS);
}
if (tty->cstyle != s->cstyle) {