diff --git a/docs/changelog.rst b/docs/changelog.rst index 95cc3b928..c224ed372 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -172,6 +172,9 @@ Detailed list of changes - ssh kitten: Fix directories such as :file:`~/.terminfo` being created world writable on the remote host on first connect (:iss:`10834`) +- Remote control: Fix ``kitten @ set-colors`` failing on color files containing + ``cursor_text_color background`` (:iss:`10832`) + 0.50.0 [2026-11-03] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tools/cmd/at/set_colors.go b/tools/cmd/at/set_colors.go index c58a94fd4..c89cb2af8 100644 --- a/tools/cmd/at/set_colors.go +++ b/tools/cmd/at/set_colors.go @@ -322,6 +322,10 @@ func encode_special_color(key, val string) (int64, error) { } func set_color_in_color_map(key, val string, ans map[string]any, check_nullable, skip_nullable bool) error { + if key == "cursor_text_color" && val == "background" { + // matches cursor_text_color() in kitty/options/utils.py + val = "none" + } if val == "none" { if check_nullable && !nullable_colors[key] { if skip_nullable { diff --git a/tools/cmd/at/set_colors_test.go b/tools/cmd/at/set_colors_test.go index 2749463d2..6a7e22b05 100644 --- a/tools/cmd/at/set_colors_test.go +++ b/tools/cmd/at/set_colors_test.go @@ -62,6 +62,7 @@ func TestSetColorsConfFiles(t *testing.T) { " background #0000ff", "font_size 12", "cursor none", + "cursor_text_color background", "background_opacity 0.5", "wayland_titlebar_color background", "include base.conf", @@ -72,7 +73,7 @@ func TestSetColorsConfFiles(t *testing.T) { t.Fatal(err) } expected := map[string]any{ - "foreground": uint32(0xff0000), "background": uint32(0xff), "cursor": nil, + "foreground": uint32(0xff0000), "background": uint32(0xff), "cursor": nil, "cursor_text_color": nil, "selection_background": uint32(0xff00), "color1": uint32(0xaaaaaa), "wayland_titlebar_color": int64(1), }