diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | config.c | 2 | ||||
| -rw-r--r-- | config.h | 2 | ||||
| -rw-r--r-- | doc/foot.ini.5.scd | 4 | ||||
| -rw-r--r-- | render.c | 5 |
5 files changed, 11 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f4ed6459..8e9ca7d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,9 +68,11 @@ * Support for custom regex matching ([#1386][1386], [#1872][1872]) * Support for kitty's text-sizing protocol (`w`, width, only), OSC-66. +* `cursor.style` can now be set to `hollow` ([#1965][1965]). [1386]: https://codeberg.org/dnkl/foot/issues/1386 [1872]: https://codeberg.org/dnkl/foot/issues/1872 +[1965]: https://codeberg.org/dnkl/foot/issues/1965 ### Changed @@ -1517,7 +1517,7 @@ parse_section_cursor(struct context *ctx) return value_to_enum( ctx, - (const char *[]){"block", "underline", "beam", NULL}, + (const char *[]){"block", "underline", "beam", "hollow", NULL}, (int *)&conf->cursor.style); } @@ -28,7 +28,7 @@ struct font_size_adjustment { float percent; }; -enum cursor_style { CURSOR_BLOCK, CURSOR_UNDERLINE, CURSOR_BEAM }; +enum cursor_style { CURSOR_BLOCK, CURSOR_UNDERLINE, CURSOR_BEAM, CURSOR_HOLLOW }; enum cursor_unfocused_style { CURSOR_UNFOCUSED_UNCHANGED, CURSOR_UNFOCUSED_HOLLOW, diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 87673233..56004654 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -842,8 +842,8 @@ applications can change these at runtime. *style* Configures the default cursor style, and is one of: *block*, - *beam* or *underline*. Note that this can be overridden by - applications. Default: _block_. + *beam*, *underline* or *hollow*. Note that this can be overridden + by applications. Default: _block_. *unfocused-style* Configures how the cursor is rendered when the terminal window is @@ -647,6 +647,11 @@ draw_cursor(const struct terminal *term, const struct cell *cell, draw_underline_cursor(term, pix, font, &cursor_color, x, y, cols); } break; + + case CURSOR_HOLLOW: + if (likely(term->cursor_blink.state == CURSOR_BLINK_ON)) + draw_hollow_block(term, pix, &cursor_color, x, y, cols); + break; } } |
