aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--csi.c10
-rw-r--r--foot.info2
-rw-r--r--main.c1
-rw-r--r--terminal.h1
4 files changed, 11 insertions, 3 deletions
diff --git a/csi.c b/csi.c
index 62ab20cd..9487d8b3 100644
--- a/csi.c
+++ b/csi.c
@@ -929,7 +929,12 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'q': {
int param = vt_param_get(term, 0, 0);
switch (param) {
- case 0: case 1: /* blinking block */
+ case 0:
+ term->cursor_style = term->default_cursor_style;
+ term->cursor_blinking = false; /* TODO: configurable */
+ break;
+
+ case 1: /* blinking block */
case 2: /* steady block */
term->cursor_style = CURSOR_BLOCK;
break;
@@ -945,7 +950,8 @@ csi_dispatch(struct terminal *term, uint8_t final)
break;
}
- term->cursor_blinking = param == 0 || param & 1;
+ if (param != 0)
+ term->cursor_blinking = param & 1;
if (term->cursor_blinking)
LOG_WARN("unimplemented: blinking cursor");
break;
diff --git a/foot.info b/foot.info
index 4388df77..241238dc 100644
--- a/foot.info
+++ b/foot.info
@@ -237,7 +237,7 @@ foot+base|foot base fragment,
vpa=\E[%i%p1%dd,
E3=\E[3J,
Ms=\E]52;%p1%s;%p2%s\007,
- Se=\E[2 q,
+ Se=\E[0 q,
Ss=\E[%p1%d q,
# XM tells ncurses how to initialize the mouse. The xterm terminfo
diff --git a/main.c b/main.c
index f725c9e5..917eec9d 100644
--- a/main.c
+++ b/main.c
@@ -371,6 +371,7 @@ main(int argc, char *const *argv)
conf.colors.bright[7],
},
},
+ .default_cursor_style = conf.cursor.style,
.cursor_style = conf.cursor.style,
.selection = {
.start = {-1, -1},
diff --git a/terminal.h b/terminal.h
index ad46a44e..71d66566 100644
--- a/terminal.h
+++ b/terminal.h
@@ -293,6 +293,7 @@ struct terminal {
struct coord cursor;
struct coord saved_cursor;
struct coord alt_saved_cursor;
+ enum cursor_style default_cursor_style;
enum cursor_style cursor_style;
bool cursor_blinking;