mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04:00
osc: OSC 12: mimic xterm - a color value of 0 means use inverted fg/bg
This commit is contained in:
parent
db9b99e8ac
commit
9eda632c97
2 changed files with 6 additions and 1 deletions
|
|
@ -65,6 +65,8 @@
|
||||||
* Translation of cursor coordinates on resize
|
* Translation of cursor coordinates on resize
|
||||||
* Scaling of legacy formatted color specifiers in OSC sequences.
|
* Scaling of legacy formatted color specifiers in OSC sequences.
|
||||||
* `OSC 12 ?` to return the cursor color, not the cursor's text color.
|
* `OSC 12 ?` to return the cursor color, not the cursor's text color.
|
||||||
|
* `OSC 12;#000000` to configure the cursor to use inverted
|
||||||
|
foreground/background colors.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
5
osc.c
5
osc.c
|
|
@ -541,7 +541,10 @@ osc_dispatch(struct terminal *term)
|
||||||
|
|
||||||
LOG_INFO("change cursor color to %06x", color);
|
LOG_INFO("change cursor color to %06x", color);
|
||||||
|
|
||||||
term->cursor_color.cursor = 1 << 31 | color;
|
if (color == 0)
|
||||||
|
term->cursor_color.cursor = 0; /* Invert fg/bg */
|
||||||
|
else
|
||||||
|
term->cursor_color.cursor = 1u << 31 | color;
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue