mirror of
https://github.com/tmux/tmux.git
synced 2025-09-08 16:29:03 +00:00
Restore default blinking state when restoring default cursor style, from
Andrea Alberti.
This commit is contained in:
12
input.c
12
input.c
@ -1558,7 +1558,8 @@ input_csi_dispatch(struct input_ctx *ictx)
|
|||||||
case INPUT_CSI_QUERY_PRIVATE:
|
case INPUT_CSI_QUERY_PRIVATE:
|
||||||
switch (input_get(ictx, 0, 0, 0)) {
|
switch (input_get(ictx, 0, 0, 0)) {
|
||||||
case 12: /* cursor blink: 1 = blink, 2 = steady */
|
case 12: /* cursor blink: 1 = blink, 2 = steady */
|
||||||
if (s->mode & MODE_CURSOR_BLINKING_SET)
|
if (s->cstyle != SCREEN_CURSOR_DEFAULT ||
|
||||||
|
s->mode & MODE_CURSOR_BLINKING_SET)
|
||||||
n = (s->mode & MODE_CURSOR_BLINKING) ? 1 : 2;
|
n = (s->mode & MODE_CURSOR_BLINKING) ? 1 : 2;
|
||||||
else {
|
else {
|
||||||
if (ictx->wp != NULL)
|
if (ictx->wp != NULL)
|
||||||
@ -1742,8 +1743,13 @@ input_csi_dispatch(struct input_ctx *ictx)
|
|||||||
break;
|
break;
|
||||||
case INPUT_CSI_DECSCUSR:
|
case INPUT_CSI_DECSCUSR:
|
||||||
n = input_get(ictx, 0, 0, 0);
|
n = input_get(ictx, 0, 0, 0);
|
||||||
if (n != -1)
|
if (n == -1)
|
||||||
screen_set_cursor_style(n, &s->cstyle, &s->mode);
|
break;
|
||||||
|
screen_set_cursor_style(n, &s->cstyle, &s->mode);
|
||||||
|
if (n == 0) {
|
||||||
|
/* Go back to default blinking state. */
|
||||||
|
screen_write_mode_clear(sctx, MODE_CURSOR_BLINKING_SET);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case INPUT_CSI_XDA:
|
case INPUT_CSI_XDA:
|
||||||
n = input_get(ictx, 0, 0, 0);
|
n = input_get(ictx, 0, 0, 0);
|
||||||
|
Reference in New Issue
Block a user