mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
csi: implement 'civis' (show/hide cursor)
This commit is contained in:
parent
a7a28ff581
commit
5e8c75aa38
3 changed files with 5 additions and 3 deletions
4
csi.c
4
csi.c
|
|
@ -567,7 +567,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
|
||||
case 25:
|
||||
LOG_WARN("unimplemented: civis");
|
||||
term->hide_cursor = false;
|
||||
break;
|
||||
|
||||
case 1000:
|
||||
|
|
@ -625,7 +625,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
|
||||
case 25:
|
||||
LOG_WARN("unimplemented: civis");
|
||||
term->hide_cursor = true;
|
||||
break;
|
||||
|
||||
case 1000:
|
||||
|
|
|
|||
3
main.c
3
main.c
|
|
@ -134,7 +134,8 @@ grid_render_update(struct context *c, struct buffer *buf, const struct damage *d
|
|||
|
||||
/* Cursor here? */
|
||||
bool has_cursor
|
||||
= c->term.cursor.linear == linear_cursor - c->term.grid->offset;
|
||||
= (!c->term.hide_cursor &&
|
||||
(c->term.cursor.linear == linear_cursor - c->term.grid->offset));
|
||||
|
||||
int x = col * c->term.cell_width;
|
||||
int y = row * c->term.cell_height;
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ struct terminal {
|
|||
pid_t slave;
|
||||
int ptmx;
|
||||
|
||||
bool hide_cursor;
|
||||
enum decckm decckm;
|
||||
enum keypad_mode keypad_mode;
|
||||
bool bracketed_paste;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue