aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-04 18:19:24 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-04 18:19:24 +0000
commitaf9e5aef2b0fe98320d9964439d5d9dffa2d558f (patch)
tree72c44a3d7b54911cf43173c809271fed73ce7265 /csi.c
parentterm: check return value when instantiating thread synchronization primitives (diff)
csi: ignore invalid parameters in 'CSI Ps <space> q'
Before this patch, an invalid parameter would not change the cursor style, but could cause the cursor to start (or stop) blinking.
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/csi.c b/csi.c
index d437f5a6..eb188656 100644
--- a/csi.c
+++ b/csi.c
@@ -1452,12 +1452,18 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 6: /* steady bar */
term->cursor_style = CURSOR_BAR;
break;
+
+ default:
+ UNHANDLED();
+ break;
}
- if (param == 0 || param & 1)
- term_cursor_blink_enable(term);
- else
- term_cursor_blink_disable(term);
+ if (param <= 6) {
+ if (param == 0 || param & 1)
+ term_cursor_blink_enable(term);
+ else
+ term_cursor_blink_disable(term);
+ }
break;
}