aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-22 18:23:29 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-22 18:23:29 +0000
commit751ac55f649c35134d1cd4e12f48cb19fa808bae (patch)
tree8946804340d3b37dc0b7d9f9393684c9e808be0b /csi.c
parentcsi: let CSI 0 q mean "switch to user configured cursor style" (diff)
csi: *sigh* looks like e.g. neovim doesn't respect Se
I.e. it issues a \E[2 q regardless of what we've configured the terminfo Se entry to. So, make \E[2 q mean "the user configured cursor style" (which defaults to 'block').
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/csi.c b/csi.c
index 9487d8b3..19c0e8b3 100644
--- a/csi.c
+++ b/csi.c
@@ -929,14 +929,12 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'q': {
int param = vt_param_get(term, 0, 0);
switch (param) {
- case 0:
- term->cursor_style = term->default_cursor_style;
- term->cursor_blinking = false; /* TODO: configurable */
+ case 0: case 1: /* blinking block */
+ term->cursor_style = CURSOR_BLOCK;
break;
- case 1: /* blinking block */
- case 2: /* steady block */
- term->cursor_style = CURSOR_BLOCK;
+ case 2: /* steady block - but can be overriden in footrc */
+ term->cursor_style = term->default_cursor_style;
break;
case 3: /* blinking underline */
@@ -950,8 +948,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
break;
}
- if (param != 0)
- term->cursor_blinking = param & 1;
+ term->cursor_blinking = param == 0 || param & 1;
if (term->cursor_blinking)
LOG_WARN("unimplemented: blinking cursor");
break;