" -P - If the cursor is blinking, reset its timer for printing.\n"
" -m - Set default cursor style (0 = block, 1 = line, 2 = bar).\n"
" -M - Enable very visible cursor mode by default.\n"
+ " Can also be controlled with the escape sequences \n"
+ " [?658467;65541h and [?658467;65542h.\n"
" -d - Log emulator debug messages to stderr.\n"
" -D - Toggle if the cursor can be disabled or not.\n"
" -S - Wait in a sleeping loop until the user closes the window\n"
break;
case 12:
case 13: /* FALLTHROUGH
- * Start blinking cursor.
+ * Start blinking cursor
* We don't allow applications to
* change it with sequence 12, only
* the user with 13.
case 25: /* Show cursor (DECTCEM, cvvis) */
/* XXX "Very visible" vs cnorm */
st->cursor_disabled = false;
- st->cursor_bright = true;
break;
case 2004: /* Bracketed paste mode */
st->quotedpaste = true;
font_reset(st);
st->text_updateall =
true;
+ } else if (p == 65541) {
+ cfg_cursorbright =
+ st->cursor_bright
+ = true;
+ } else if (p == 65542) {
+ cfg_cursorbright =
+ st->cursor_bright
+ = false;
}
} else if (state->curparam == 2 &&
state->csiparam[1] ==
break;
case 6:
/* Normal cursor mode (DECOM cnorm) */
-
+ /* User-configured as default */
+ st->cursor_mode = cfg_cursormode;
+ st->cursor_blink = cfg_cursorblink;
+ st->cursor_bright = cfg_cursorbright;
break;
case 12:
case 13: /* FALLTHROUGH
st->cursor_mode = CMODE_BLOCK;
if (cfg_cursorblink)
st->cursor_blink = true;
+ st->cursor_bright = true; /* XXX */
break;
case 2:
st->cursor_mode = CMODE_BLOCK;
st->cursor_blink = false;
+ st->cursor_bright = cfg_cursorbright;
break;
case 3:
st->cursor_mode = CMODE_LINE;
if (cfg_cursorblink)
st->cursor_blink = true;
+ st->cursor_bright = cfg_cursorbright;
break;
case 4:
st->cursor_mode = CMODE_LINE;
st->cursor_blink = false;
+ st->cursor_bright = cfg_cursorbright;
break;
case 5:
st->cursor_mode = CMODE_BAR;
if (cfg_cursorblink)
st->cursor_blink = true;
+ st->cursor_bright = cfg_cursorbright;
break;
case 6:
st->cursor_mode = CMODE_BAR;
st->cursor_blink = false;
+ st->cursor_bright = cfg_cursorbright;
break;
}
}