mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
DECSCUSR+DECRQSS: treat hollow cursor as a block cursor
If the user has configured cursor.style=hollow, make DECSCUSR 1/2 set
the cursor to hollow rather than block, and make DECRQSS DECSCUSR
respond as if cursor.style=block.
The idea is to not expose the hollow variant in DECSCUSR in any way,
to avoid having to extend it with custom encodings.
Another way to think about it is this is just a slightly more
discoverable way of doing:
cursor.style=block
cursor.block-cursor-is-hollow=yes
This commit is contained in:
parent
c41008da31
commit
4f11d6086f
2 changed files with 3 additions and 1 deletions
3
csi.c
3
csi.c
|
|
@ -1756,7 +1756,8 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
|
||||
case 1: /* blinking block */
|
||||
case 2: /* steady block */
|
||||
term->cursor_style = CURSOR_BLOCK;
|
||||
term->cursor_style = term->conf->cursor.style == CURSOR_HOLLOW
|
||||
? CURSOR_HOLLOW : CURSOR_BLOCK;
|
||||
break;
|
||||
|
||||
case 3: /* blinking underline */
|
||||
|
|
|
|||
1
dcs.c
1
dcs.c
|
|
@ -422,6 +422,7 @@ decrqss_unhook(struct terminal *term)
|
|||
int mode;
|
||||
|
||||
switch (term->cursor_style) {
|
||||
case CURSOR_HOLLOW: /* FALLTHROUGH */
|
||||
case CURSOR_BLOCK: mode = 2; break;
|
||||
case CURSOR_UNDERLINE: mode = 4; break;
|
||||
case CURSOR_BEAM: mode = 6; break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue