1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

allow cursor_fg = "none" to use text fg color

Similar to selection_fg, setting the cursor_fg to transparent ("none")
will use the foreground color of the text behind the cursor.

refs: https://github.com/wez/wezterm/issues/1835
This commit is contained in:
Wez Furlong 2022-08-23 19:54:19 -07:00
parent 0141d340f3
commit 3b4e859956

View File

@ -3101,7 +3101,11 @@ impl super::TermWindow {
if self.config.force_reverse_video_cursor && params.cursor_is_default_color {
(params.bg_color, params.fg_color, params.fg_color)
} else {
(params.cursor_fg, params.cursor_bg, params.cursor_bg)
(
params.cursor_fg.when_fully_transparent(params.fg_color),
params.cursor_bg,
params.cursor_bg,
)
}
}
(